From 0a32292f0e4cfc5a9a9c4f99b4dce0dac028de5e Mon Sep 17 00:00:00 2001 From: Emuis <emuis@tfwno.gf> Date: Thu, 4 Jan 2018 11:27:53 -0500 Subject: [PATCH] add arm support to compile scripts --- compile | 16 ++++++++++++---- compile-git | 15 ++++++++++++--- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/compile b/compile index ae11f96ba82..0398ea1cf78 100755 --- a/compile +++ b/compile @@ -8,15 +8,23 @@ sed -i "s/COMMIT/$COMMIT/" ./src/init/storyInit.tw # Run sanity check. ./sanityCheck -HASH=`git log -n1 |grep commit | sed 's/commit //'` - -if [ $(uname -m) = "x86_64" ] +ARCH="$(uname -m)" +if [ "$ARCH" = "x86_64" ] then echo "x64 arch" ./devTools/tweeGo/tweego_nix64 -o bin/FC_pregmod.html src/ -else +elif echo "$ARCH" | grep -Ee '86$' > /dev/null +then echo "x86 arch" ./devTools/tweeGo/tweego_nix86 -o bin/FC_pregmod.html src/ +elif echo "$ARCH" | grep -Ee '^arm' > /dev/null +then + echo "arm arch" + # tweego doesn't provide arm binaries so you have to build it yourself + TWEEGO_PATH=devTools/tweeGo/storyFormats + tweego -o bin/FC_pregmod.html src/ +else + exit 2 fi #Make the output prettier, replacing \t with a tab and \n with a newline diff --git a/compile-git b/compile-git index 5d33f0a2be5..bf5800e83b8 100755 --- a/compile-git +++ b/compile-git @@ -4,14 +4,23 @@ ./sanityCheck HASH=`git log -n1 |grep -m1 commit | sed 's/commit //'` - -if [ $(uname -m) = "x86_64" ] +ARCH="$(uname -m)" +if [ "$ARCH" = "x86_64" ] then echo "x64 arch" ./devTools/tweeGo/tweego_nix64 -o bin/FC_pregmod_$HASH.html src/ -else +elif echo "$ARCH" | grep -Ee '86$' > /dev/null +then echo "x86 arch" ./devTools/tweeGo/tweego_nix86 -o bin/FC_pregmod_$HASH.html src/ +elif echo "$ARCH" | grep -Ee '^arm' > /dev/null +then + echo "arm arch" + # tweego doesn't provide arm binaries so you have to build it yourself + TWEEGO_PATH=devTools/tweeGo/storyFormats + tweego -o bin/FC_pregmod_$HASH.html src/ +else + exit 2 fi #Make the output prettier, replacing \t with a tab and \n with a newline -- GitLab