View Single Post
Old 03-21-2012, 09:03 AM   #28
defrink
Junior Member
defrink began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Mar 2012
Device: nook
It would nice if the script was modified to error and quit if either

mkdir tmp
cd tmp

fails. As written, if the current directory has a file named tmp, the mkdir silently fails, the cd fails, and the script proceeds with an eventual call to rm *.

I recommend at least changing

mkdir tmp
cd tmp

to

mkdir tmp || exit 1
cd tmp || exit 2
defrink is offline   Reply With Quote