From 0e10f608b96332b1907f303c3823ff072440e20d Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Tue, 21 Apr 2009 09:27:59 +0000 Subject: [PATCH] check to see if .build_data exists in check_file before running the grep don't remove the concatenated files if the compression fails --- deluge/ui/web/js/build.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/deluge/ui/web/js/build.sh b/deluge/ui/web/js/build.sh index 490b00887..43ff3d77d 100755 --- a/deluge/ui/web/js/build.sh +++ b/deluge/ui/web/js/build.sh @@ -9,6 +9,9 @@ scan() { } check_file() { + # No build data is stored so return 1 since we can't make any guesses. + [ ! -e .build_data ] && return 1; + FILE=$1 LAST_BUILD=`grep $FILE .build_data` if [ $? == 1 ]; then return 1; fi; @@ -31,8 +34,7 @@ build_deluge() { echo "Building deluge-yc.js" cat $DELUGE_FILES > deluge-yc.js.tmp - yuicompressor --type=js -o "deluge-yc.js" "deluge-yc.js.tmp" - rm "deluge-yc.js.tmp" + yuicompressor --type=js -o "deluge-yc.js" "deluge-yc.js.tmp" && rm "deluge-yc.js.tmp" } build_ext() {