Fix HEAD ref lookups, and compatibility for non-bash shells.

This commit is contained in:
Jim Wise 2011-10-24 09:38:25 -04:00
parent 9ae145dfb3
commit 987e39e16c
2 changed files with 5 additions and 5 deletions

View file

@ -26,7 +26,7 @@ generate_version() {
fi
# Build it.
version_head=`git rev-parse HEAD`
if `cat .git/HEAD` | grep -q "ref: refs/heads/.*" > /dev/null 2>&1
if grep -q "ref: refs/heads/.*" .git/HEAD > /dev/null 2>&1
then
version_branchname=`cut -d / -f 3- < .git/HEAD`
else

View file

@ -191,10 +191,10 @@ generate_version
# dependencies, write them out to a file to be sourced by other
# scripts.
echo "export DEVNULL=\"$DEVNULL\"" > output/build-config
echo "export GNUMAKE=\"$GNUMAKE\"" >> output/build-config
echo "export SBCL_XC_HOST=\"$SBCL_XC_HOST\"" >> output/build-config
echo "export legacy_xc_spec=\"$legacy_xc_spec\"" >> output/build-config
echo "DEVNULL=\"$DEVNULL\"; export DEVNULL" > output/build-config
echo "GNUMAKE=\"$GNUMAKE\"; export GNUMAKE" >> output/build-config
echo "SBCL_XC_HOST=\"$SBCL_XC_HOST\"; export SBCL_XC_HOST" >> output/build-config
echo "legacy_xc_spec=\"$legacy_xc_spec\"; export legacy_xc_spec" >> output/build-config
# And now, sorting out the per-target dependencies...