fish-shell/build_tools/xcode_version_gen.sh
ridiculousfish d08820f697 Update xcode_version_gen.sh for new build version file format
FISH-BUILD-VERSION-FILE no longer contains spaces. Update
xcode_version_gen.sh to know about that.

This fixes the Xcode build.
2017-10-18 11:51:18 -07:00

18 lines
413 B
Bash
Executable File

#!/bin/bash
# Expects to be called from Xcode (Run Script build phase),
# write version number C preprocessor macro to header file.
tmp="$SCRIPT_OUTPUT_FILE_1"
ver="$SCRIPT_OUTPUT_FILE_0"
./build_tools/git_version_gen.sh
cat FISH-BUILD-VERSION-FILE | awk -F= '{printf("#define %s \"%s\"\n",$1,$2)}' > "$tmp"
cmp --quiet "$tmp" "$ver"
if [ $? -ne 0 ]; then
/bin/mv "$tmp" "$ver"
else
/bin/rm "$tmp"
fi