4coder/package.sh

102 lines
1.8 KiB
Bash
Raw Normal View History

2016-03-07 07:17:46 +00:00
#!/bin/bash
2016-03-07 06:11:37 +00:00
#!/bin/sh
# Linux packaging script by insofaras
#
# Usage:
#
# * Put all the .txt, .ttf, etc stuff in TEMPLATE_DIR and it'll get copied over
# (including the 3rd party folder)
#
# * Put the makefile (included at the end of this file) in the dir above 4coder/code
#
# * Change the other dir variables as appropriate
#
TEMPLATE_DIR="$HOME/Desktop/4coder/release_template/"
CODE_DIR="$HOME/Desktop/4coder"
TMP_DIR="/tmp/4coder"
OUT_ZIP="$HOME/Desktop/4coder-linux.zip"
2016-03-07 07:17:46 +00:00
OUT_ZIP_SUPER="$HOME/Desktop/4coder-linux-super.zip"
echo "template: $TEMPLATE_DIR"
echo "base: $CODE_DIR"
echo "temp: $TMP_DIR"
echo "out: $OUT_ZIP"
rm -rf "$OUT_ZIP"
rm -rf "$OUT_ZIP_SUPER"
2016-03-07 06:11:37 +00:00
mkdir -p "$TMP_DIR"
2016-03-07 07:17:46 +00:00
mkdir -p "$TMP_DIR/alpha"
mkdir -p "$TMP_DIR/super"
cat << EOF > "$TMP_DIR/readme.txt"
This is a linux 4coder release.
Brought to you by Mr4thDimention and insofaras.
Enjoy!
EOF
2016-03-07 06:11:37 +00:00
pushd "$CODE_DIR"
2016-03-07 07:17:46 +00:00
echo "Alpha User"
2016-03-07 06:11:37 +00:00
make clean
make release32
2016-03-07 07:17:46 +00:00
cp -r "${TEMPLATE_DIR}" "$TMP_DIR/alpha/32"
cp ./4ed ./4ed_app.so "$TMP_DIR/alpha/32/"
echo " "
2016-03-07 06:11:37 +00:00
make clean
make release
2016-03-07 07:17:46 +00:00
cp -r "${TEMPLATE_DIR}" "$TMP_DIR/alpha/64"
cp ./4ed ./4ed_app.so "$TMP_DIR/alpha/64/"
2016-03-07 06:11:37 +00:00
2016-03-07 07:17:46 +00:00
echo " "
2016-03-07 06:11:37 +00:00
2016-03-07 07:17:46 +00:00
cp "$TMP_DIR/readme.txt" "$TMP_DIR/alpha/readme.txt"
pushd "$TMP_DIR"
zip -r "$OUT_ZIP" "$(basename alpha)"
popd
2016-03-07 06:11:37 +00:00
2016-03-07 07:17:46 +00:00
echo " "
2016-03-07 06:11:37 +00:00
2016-03-07 07:17:46 +00:00
echo "Super User"
2016-03-07 06:11:37 +00:00
2016-03-07 07:17:46 +00:00
make clean
make release32
cp -r "${TEMPLATE_DIR}" "$TMP_DIR/super/32"
cp ./4ed ./4ed_app.so ./code/4coder_*.h ./code/4coder_*.cpp "$TMP_DIR/super/32/"
2016-03-07 06:11:37 +00:00
2016-03-07 07:17:46 +00:00
echo " "
make clean
make release
cp -r "${TEMPLATE_DIR}" "$TMP_DIR/super/64"
cp ./4ed ./4ed_app.so ./code/4coder_*.h ./code/4coder_*.cpp "$TMP_DIR/super/64/"
2016-03-07 06:11:37 +00:00
2016-03-07 07:17:46 +00:00
echo " "
2016-03-07 06:11:37 +00:00
2016-03-07 07:17:46 +00:00
cp "$TMP_DIR/readme.txt" "$TMP_DIR/super/readme.txt"
pushd "$TMP_DIR"
zip -r "$OUT_ZIP_SUPER" "$(basename super)"
popd
2016-03-07 06:11:37 +00:00
2016-03-07 07:17:46 +00:00
echo " "
2016-03-07 06:11:37 +00:00
2016-03-07 07:17:46 +00:00
make clean
2016-03-07 06:11:37 +00:00
2016-03-07 07:17:46 +00:00
rm -rf "$TMP_DIR"
popd
echo "Created linux 4coder package: $OUT_ZIP"
exit
2016-03-07 06:11:37 +00:00