holgerBerger / hpc-workspace

Automatically exported from code.google.com/p/hpc-workspace
GNU General Public License v3.0
18 stars 13 forks source link

ws_extend need to handle call without arguments #63

Closed URZ-HD closed 3 years ago

URZ-HD commented 3 years ago

missing arguments showing the following bash error:

> /usr/local/bin/ws_extend   
/usr/local/bin/ws_extend: line 8: [: too many arguments
Usage: ws_extend [-F filesystem] workspace days
line 8: if [ $# -eq 4 -a $1 = "-F" ]

I'm not sure why this error happens, because the $# is 0 and the second condition should not be evaluated... Maybe splitting both tests in two if-clauses would be an easy fix