]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - all
fix yet another ./all typo
[xonotic/xonotic.git] / all
diff --git a/all b/all
index fb30b1e793aa61946529bcc37deac7f392b06c50..cc26e5be4dcd64b745e4095638290194e3a1e3fb 100755 (executable)
--- a/all
+++ b/all
@@ -39,23 +39,10 @@ msg()
        echo "\e[1m$*\e[m"
 }
 
-checksum()
-{
-       if [ -x /usr/bin/md5sum ]; then
-               /usr/bin/md5sum "$@"
-       elif [ -x /bin/md5sum ]; then
-               /bin/md5sum "$@"
-       elif [ -x /usr/bin/cksum ]; then
-               /usr/bin/cksum "$@"
-       else
-               echo "NOCHECKSUM"
-       fi
-}
-
-self=`checksum "$SELF"`
+self=`git hash-object "$SELF"`
 checkself()
 {
-       self_new=`checksum "$SELF"`
+       self_new=`git hash-object "$SELF"`
        if [ x"$self" != x"$self_new" ]; then
                msg "./all has changed."
                if [ -z "$XONOTIC_FORBID_RERUN_ALL" ]; then
@@ -413,7 +400,7 @@ case "$cmd" in
                        rem=`git config "branch.$r.remote" || echo origin`
                        bra=`git config "branch.$r.merge" || echo "$r"`
                        upstream="$rem/$bra"
-                       if ! [ git rev-parse "$upstream" ]; then
+                       if ! git rev-parse "$upstream" >/dev/null 2>&1; then
                                upstream="`repobranch "$d"`"
                        fi
                        if git log "$upstream".."$r" | grep .; then