]> git.eshelyaron.com Git - emacs.git/commitdiff
Try to work around intermittent autogen failure on hydra.nixos.org
authorGlenn Morris <rgm@gnu.org>
Sat, 3 Feb 2018 01:42:08 +0000 (20:42 -0500)
committerGlenn Morris <rgm@gnu.org>
Sat, 3 Feb 2018 01:42:08 +0000 (20:42 -0500)
* autogen.sh (check_version): Try to handle odd systems where
/bin/sh does not define the "command" builtin.

autogen.sh

index acebc2381a3f675d8566fa139f857cf025df6537..2e6b62db843e2ac17eaff3326b3541ad4a357b3f 100755 (executable)
@@ -82,7 +82,14 @@ check_version ()
         printf '%s' "(using $uprog0=$uprog) "
     fi
 
-    command -v $uprog > /dev/null || return 1
+    ## /bin/sh should always define the "command" builtin, but for
+    ## some odd reason sometimes it does not on hydra.nixos.org.
+    ## /bin/sh = "BusyBox v1.27.2", "built-in shell (ash)". ?
+    if command -v command > /dev/null; then
+        command -v $uprog > /dev/null || return 1
+    else
+        $uprog --version > /dev/null 2>&1 || return 1
+    fi
     have_version=`get_version $uprog` || return 4
 
     have_maj=`major_version $have_version`