Skip to content

Instantly share code, notes, and snippets.

@SuperPaintman
Created July 10, 2016 20:10
Show Gist options
  • Save SuperPaintman/6ea1b7c74d2dc22d63b1ca77c1133e21 to your computer and use it in GitHub Desktop.
Save SuperPaintman/6ea1b7c74d2dc22d63b1ca77c1133e21 to your computer and use it in GitHub Desktop.
#!/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