From 709fb7bc04bee67813c4d167e35c54aa34bd9148 Mon Sep 17 00:00:00 2001 From: "Tom G. Christensen" Date: Mon, 10 Apr 2006 14:19:05 +0000 Subject: [PATCH] Gracefully handle if $metadir/sums is missing --- buildpkg.packaging.irix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildpkg.packaging.irix b/buildpkg.packaging.irix index 2c16c3c..beae302 100644 --- a/buildpkg.packaging.irix +++ b/buildpkg.packaging.irix @@ -980,7 +980,7 @@ auto_rel() local path local file local source_sha1sum - local temp_source_sha1sum + local temp_source_sha1sum="" for ((s=0; $s < ${#source[@]}; s++)) do # A little snip from buildpkg.functions:unpack @@ -995,7 +995,7 @@ auto_rel() file="${source[$s]##*/}" # Extract filename part (cd "$path"; $SHA1SUM "$file") >> $metadir/sums done - temp_source_sha1sum="$(cat $metadir/sums | $AWK '{ printf "%s\\n",$0 }')" + [ -r "$metadir/sums" ] && temp_source_sha1sum="$(cat $metadir/sums | $AWK '{ printf "%s\\n",$0 }')" source_sha1sum="${temp_source_sha1sum%\\*}" # End of SHA1 sum computing local temp_extracted_env="$($SED -e 's/export /echo ENV /g' ${buildpkgbase}/${pkgdir}/build.sh >> /tmp/env.sh; bash /tmp/env.sh|$GREP ^ENV|$SED -e 's/ENV //g'|$AWK '{ printf "%s\\n",$0 }' && $RM -f /tmp/env.sh)"