diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2011-04-03 17:48:29 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2011-04-03 17:48:29 +0200 |
commit | 3fbdaa5995707a0e7398b3b78e7b7c195a143f6d (patch) | |
tree | 7038d93d46a44bba537991b532f3fd4940b17b43 /scripts | |
parent | c42d35ea08a5bf3996f7920776a47119aab818ba (diff) | |
parent | 1364c92fa9897626c520ab121ebc3e6d21e73745 (diff) |
Merge branch 'master' of git+ssh://openadk.org/git/openadk
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/reloc.sh | 2 | ||||
-rwxr-xr-x | scripts/sha256sum | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/scripts/reloc.sh b/scripts/reloc.sh index 59323612f..03034ea35 100755 --- a/scripts/reloc.sh +++ b/scripts/reloc.sh @@ -4,7 +4,7 @@ olddir=$(grep "^TOPDIR" prereq.mk 2>/dev/null |cut -d '=' -f 2) newdir=$(pwd) -if [ ! -z $olddir ];then +if [ ! -z "$olddir" ];then if [ "$olddir" != "$newdir" ];then echo "adk directory relocated!" echo "old directory: $olddir" diff --git a/scripts/sha256sum b/scripts/sha256sum index da34d9113..2a7ffb6f7 100755 --- a/scripts/sha256sum +++ b/scripts/sha256sum @@ -4,6 +4,11 @@ if [ -x /usr/bin/sha256sum ]; then /usr/bin/sha256sum "$@" +elif [ -x /bin/cksum ] && [ $(echo | cksum -a sha256) = 01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b ]; then + # we assume the arguments are exactly "-c" or "-c -" + x=$(sed 's/^\([0-9a-fA-F]*\) *\([^ ].*\)$/SHA256 (\2) = \1/' | cksum -c -a sha256) + [[ $x = *FAILED* ]] && exit 1 + exit 0 else tmp=$(mktemp -t yyy) cat - > $tmp |