]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
fixes
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Thu, 27 Nov 2008 20:06:56 +0000 (20:06 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Thu, 27 Nov 2008 20:06:56 +0000 (20:06 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@547 04377dda-e619-0410-9926-eae83683ac58

trunk/lib/common.sh

index 2fc49c9746fe6d49a45c6f76dc1b20f951150623..8ff4eb2342fb115d30c815bd43980c2af398b050 100644 (file)
@@ -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 {