Commit 5320756e authored by thomas.forbriger's avatar thomas.forbriger
Browse files

[FIX] (util): set DATADIR before first being used

parent 5ba9fd7c
...@@ -79,6 +79,9 @@ do ...@@ -79,6 +79,9 @@ do
done done
shift $((${OPTIND} - 1)) shift $((${OPTIND} - 1))
DATADIR=$1
DOWNDIR=$2
MINPARAMS=2 MINPARAMS=2
# check number of commandline arguments # check number of commandline arguments
if [ $# -lt ${MINPARAMS} ] if [ $# -lt ${MINPARAMS} ]
...@@ -105,9 +108,6 @@ then ...@@ -105,9 +108,6 @@ then
exit 2 exit 2
fi fi
DATADIR=$1
DOWNDIR=$2
if test ! \( -d $DATADIR -a -r $DATADIR \) if test ! \( -d $DATADIR -a -r $DATADIR \)
then then
echo data directory $DATADIR does not exits or is not readable echo data directory $DATADIR does not exits or is not readable
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment