Mercurial > hg > aboriginal
changeset 237:735ee8a5ca35
Fix the path to calculate the tarball sha1sum, use the sha1file function more
than once, fix sha1file to handle multiple arguments.
author | Rob Landley <rob@landley.net> |
---|---|
date | Tue, 30 Oct 2007 05:42:21 -0500 |
parents | 9c48cf5b65f6 |
children | acc6809a6d76 |
files | include.sh |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/include.sh Tue Oct 30 03:49:48 2007 -0500 +++ b/include.sh Tue Oct 30 05:42:21 2007 -0500 @@ -10,7 +10,7 @@ # output the sha1sum of a file function sha1file() { - sha1sum "$1" | awk '{print $1}' + sha1sum "$@" | awk '{print $1}' } # Extract tarball named in $1 and apply all relevant patches into @@ -23,7 +23,7 @@ BASENAME=`noversion "$1"` BASENAME="${BASENAME/%\.tar\.*/}" SHA1FILE="$(echo "${SRCTREE}/${BASENAME}/sha1-for-source.txt")" - SHA1TAR="$(sha1file "$1")" + SHA1TAR="$(sha1file "${SRCDIR}/$1")" # Sanity check: don't ever "rm -rf /". Just don't. @@ -36,7 +36,7 @@ SHALIST=$(cat "$SHA1FILE" 2> /dev/null) if [ ! -z "$SHALIST" ] then - for i in "$SHA1TAR" $(sha1sum "${SOURCES}/patches/$BASENAME"* 2>/dev/null | awk '{print $1}') + for i in "$SHA1TAR" $(sha1file "${SOURCES}/patches/$BASENAME"* 2>/dev/null) do # Is this sha1 in the file? [ -z "$(echo "$SHALIST" | sed -n "s/$i/$i/p" )" ] && break @@ -75,7 +75,7 @@ then echo "Applying $i" (cd "${SRCTREE}/${BASENAME}" && patch -p1 -i "$i") || dienow - sha1sum "$i" | awk '{print $1}' >> "$SHA1FILE" + sha1file "$i" >> "$SHA1FILE" fi done }