aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2017-08-05 20:12:57 -0500
committerRob Landley <rob@landley.net>2017-08-05 20:12:57 -0500
commitec306e9244ffb5b6dfc82c0ef8a10be52d0e21e8 (patch)
tree0721af704041efefa06393fd0170aeb2b2a4e88a
parent94a898150d5e1fbb89ec46ba56a8600be954a809 (diff)
downloadtoybox-ec306e9244ffb5b6dfc82c0ef8a10be52d0e21e8.tar.gz
Allow GITHASH to be set on the command line, to work around a yocto bug.
-rwxr-xr-xscripts/make.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/make.sh b/scripts/make.sh
index 9c22d4f4..4893e22f 100755
--- a/scripts/make.sh
+++ b/scripts/make.sh
@@ -67,7 +67,7 @@ fi
# Extract a list of toys/*/*.c files to compile from the data in $KCONFIG_CONFIG
# (First command names, then filenames with relevant {NEW,OLD}TOY() macro.)
-GITHASH="$(git describe --tags --abbrev=12 2>/dev/null)"
+[ -z "$GITHASH" ] && GITHASH="$(git describe --tags --abbrev=12 2>/dev/null)"
[ ! -z "$GITHASH" ] && GITHASH="-DTOYBOX_VERSION=\"$GITHASH\""
TOYFILES="$($SED -n 's/^CONFIG_\([^=]*\)=.*/\1/p' "$KCONFIG_CONFIG" | xargs | tr ' [A-Z]' '|[a-z]')"
TOYFILES="$(egrep -l "TOY[(]($TOYFILES)[ ,]" toys/*/*.c)"