Created
July 10, 2016 20:10
-
-
Save SuperPaintman/6ea1b7c74d2dc22d63b1ca77c1133e21 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
RETVAL=0 | |
if [ -z "$1" ]; then | |
echo "Usage: build <bin_name>" | |
exit 1 | |
fi | |
bin_name="$1" | |
temp_file=$(mktemp) | |
trap "rm $temp_file; exit" EXIT | |
zip -9 -q -r - . > $temp_file | |
cat $(which love) $temp_file > $bin_name | |
chmod +x $bin_name | |
exit $RETVAL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment