switch -k funktioniert
This commit is contained in:
+7
-3
@@ -9,6 +9,7 @@ Usage: `basename $0` [-h] [-i] [-j nb_jobs] command arg_list
|
||||
-h Shows this help
|
||||
-c give the path to the cfg file
|
||||
-i give the path of the svg files without the last /
|
||||
-k chek if the jpg already exist
|
||||
-j Set number of simultanious jobs. Default is 2
|
||||
-o directory where the files should be moved to after creation.
|
||||
Default ist PICCREATE_OUT
|
||||
@@ -114,12 +115,14 @@ if [ $# -eq 0 ]; then # must be at least one arg
|
||||
exit 1
|
||||
fi
|
||||
|
||||
while getopts "j:i:k:o:hc:" OPT; do # "j:" waits for an argument "h" doesnt
|
||||
CHECKFILE=0
|
||||
|
||||
while getopts "j:i:kc:o:hc:" OPT; do # "j:" waits for an argument "h" doesnt
|
||||
case $OPT in
|
||||
h) echo "$USAGE"
|
||||
exit 0 ;;
|
||||
j) MAX_NPROC=$OPTARG ;;
|
||||
k) CHECKFILE=$OPTARG ;;
|
||||
k) CHECKFILE=1 ;;
|
||||
c) CFG_FILENAME=$OPTARG ;;
|
||||
o) OUTDIR=$OPTARG ;;
|
||||
i) INPUT_FILENAME=$OPTARG ;;
|
||||
@@ -137,10 +140,11 @@ echo $INPUT_FILE
|
||||
for i in `ls $INPUT_FILE| grep .svg `
|
||||
do
|
||||
echo $i
|
||||
echo $CHECKFILE
|
||||
ID=`echo "$i" | sed -e 's/;.*//g'`
|
||||
PIC_NAME=`echo "$i" | sed -e 's/.svg/.jpg/g'`
|
||||
FILE_PATH=$INPUT_FILE/$PIC_NAME
|
||||
if [ -s $FILE_PATH ]
|
||||
if [ -s $FILE_PATH ] && [ $CHECKFILE -eq 1 ]
|
||||
then
|
||||
echo $PIC_NAME exists!
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user