Skip to content
Snippets Groups Projects
compile-git 985 B
Newer Older
  • Learn to ignore specific revisions
  • pregmodfan's avatar
    pregmodfan committed
    #!/bin/bash
    
    
    # Run sanity check.
    
    ./sanityCheck
    
    pregmodfan's avatar
    pregmodfan committed
    
    
    HASH="$(git rev-list -n 1 --abbrev-commit HEAD)"
    
    
    case "$(uname -m)" in
    x86_64|amd64)
    
    pregmodfan's avatar
    pregmodfan committed
    	echo "x64 arch"
    
    	if [ "$(uname -s)" = "Darwin" ]; then
    		TWEEGO_EXE="./devTools/tweeGo/tweego_osx64"
    	else
    		TWEEGO_EXE="./devTools/tweeGo/tweego_nix64"
    	fi
    	;;
    x86|i[3-6]86)
    
    pregmodfan's avatar
    pregmodfan committed
    	echo "x86 arch"
    
    	if [ "$(uname -s)" = "Darwin" ]; then
    		TWEEGO_EXE="./devTools/tweeGo/tweego_osx86"
    	else
    		TWEEGO_EXE="./devTools/tweeGo/tweego_nix86"
    	fi
    	;;
    arm*)
    
    	echo "arm arch"
    	# tweego doesn't provide arm binaries so you have to build it yourself
    
    Emuis's avatar
    Emuis committed
    	export TWEEGO_PATH=devTools/tweeGo/storyFormats
    
    	TWEEGO_EXE="tweego"
    	;;
    *)
    	echo "unsupported architecture"
    
    	exit 2
    
    esac
    
    $TWEEGO_EXE -o "bin/FC_pregmod_$HASH.html" src/
    
    Pregmodder's avatar
    Pregmodder committed
    #Make the output prettier, replacing \t with a tab and \n with a newline
    
    sed -i -e '/^<div id="store-area".*$/s/\\t/\t/g' -e '/^<div id="store-area".*$/s/\\n/\n/g'  "bin/FC_pregmod_$HASH.html"
    
    Pregmodder's avatar
    Pregmodder committed
    
    echo "FC_pregmod_$HASH.html" compilation finished.