Skip to content
Snippets Groups Projects
compile-git 866 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)"
    
    ARCH="$(uname -m)"
    if [ "$ARCH" = "x86_64" ]
    
    pregmodfan's avatar
    pregmodfan committed
    then
    	echo "x64 arch"
    
    	./devTools/tweeGo/tweego_nix64 -o "bin/FC_pregmod_$HASH.html" src/
    
    elif echo "$ARCH" | grep -Ee '86$' > /dev/null
    then
    
    pregmodfan's avatar
    pregmodfan committed
    	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
    
    Emuis's avatar
    Emuis committed
    	export TWEEGO_PATH=devTools/tweeGo/storyFormats
    
    	tweego -o "bin/FC_pregmod_$HASH.html" src/
    
    else
    	exit 2
    
    pregmodfan's avatar
    pregmodfan committed
    fi
    
    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.