From: niekt0 Date: Thu, 4 Nov 2010 18:05:28 +0000 (+0100) Subject: process img test X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=bda5b0364b31dc8d109d36da443587613ace11b9;p=mirrors%2FKyberia-bloodline.git process img test --- diff --git a/cron/process-images.sh b/cron/process-images.sh index 2afd6dc..e0f6936 100755 --- a/cron/process-images.sh +++ b/cron/process-images.sh @@ -5,12 +5,14 @@ # Created & maintained by maniax -cd /storage/system/www-root/kyberia.sk/process-img +#cd /storage/system/www-root/kyberia.sk/process-img + +echo "`pwd`"; >> /tmp/log1 PREPARED_FILES=`ls prepared/` CURRENT_DATE=`date` -for PREPARED_FILE in $PREPARED_FILES +for PREPARED_FILE in "$PREPARED_FILES" do echo "[$CURRENT_DATE] Processing file: $PREPARED_FILE" >> process-img.log @@ -27,12 +29,12 @@ do rm -f prepared/$PREPARED_FILE - TGT_PART1=`echo $NODE_FILENAME | cut -b 1` - TGT_PART2=`echo $NODE_FILENAME | cut -b 2` + TGT_PART1=`echo "$NODE_FILENAME" | cut -b 1` + TGT_PART2=`echo "$NODE_FILENAME" | cut -b 2` - mv ready/$NODE_FILENAME ../images/nodes/$TGT_PART1/$TGT_PART2/$NODE_FILENAME - chgrp www ../images/nodes/$TGT_PART1/$TGT_PART2/$NODE_FILENAME - chmod 664 ../images/nodes/$TGT_PART1/$TGT_PART2/$NODE_FILENAME + mv ready/"$NODE_FILENAME" ../images/nodes/"$TGT_PART1/$TGT_PART2/$NODE_FILENAME" + chgrp www ../images/nodes/"$TGT_PART1/$TGT_PART2/$NODE_FILENAME" + chmod 664 ../images/nodes/"$TGT_PART1/$TGT_PART2/$NODE_FILENAME" echo "[$CURRENT_DATE] Finished file processing." >> process-img.log done