diff options
-rw-r--r-- | trunk/lib/common.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh index 2fc49c9..8ff4eb2 100644 --- a/trunk/lib/common.sh +++ b/trunk/lib/common.sh @@ -778,10 +778,13 @@ function update_md5_checksum { # update CHECKSUMS.md5 # usage: update_md5_checksums <folder> <file> - if [ -z "$2" ] || [ ! -d "$1" ] || [ ! -f "$file" ]; then + if [ -z "$2" ] || [ ! -d "$1" ] || [ ! -f "$1/$2" ]; then return 1 fi + CWD="`pwd`" + cd $1 + if ! echo $2 | grep -q -e "^\.\/"; then # add ./ in front of the file name file="./$1" @@ -802,6 +805,8 @@ function update_md5_checksum { svn_add CHECKSUMS.md5 svn_add CHECKSUMS.md5.gz + cd $CWD + } function gen_meta { |