4coder/package.sh

133 lines
2.4 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"
2016-03-07 19:37:48 +00:00
OUT_ZIP="$HOME/Desktop/4coder-linux-64.zip"
OUT_ZIP_32="$HOME/Desktop/4coder-linux-32.zip"
OUT_ZIP_SUPER="$HOME/Desktop/4coder-linux-super-64.zip"
OUT_ZIP_SUPER_32="$HOME/Desktop/4coder-linux-super-32.zip"
2016-03-07 07:17:46 +00:00
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 19:37:48 +00:00
rm -rf "$OUT_ZIP_32"
rm -rf "$OUT_ZIP_SUPER_32"
2016-03-07 06:11:37 +00:00
mkdir -p "$TMP_DIR"
pushd "$CODE_DIR"
2016-03-07 07:17:46 +00:00
echo "Alpha User"
2016-03-07 19:37:48 +00:00
# ALPHA-32
pushd "$CODE_DIR/code"
2016-03-07 06:11:37 +00:00
make clean
make release32
popd
2016-03-07 19:37:48 +00:00
cp -r "${TEMPLATE_DIR}" "$TMP_DIR/alpha"
cp ./4ed ./4ed_app.so "$TMP_DIR/alpha/"
cp ./code/README.txt ./code/TODO.txt "$TMP_DIR/alpha/"
2016-03-07 19:37:48 +00:00
echo " "
pushd "$TMP_DIR"
zip -r "$OUT_ZIP_32" "$(basename alpha)"
popd
rm -rf "$TMP_DIR/alpha"
2016-03-07 07:17:46 +00:00
echo " "
2016-03-07 06:11:37 +00:00
2016-03-07 19:37:48 +00:00
# ALPHA-64
pushd "$CODE_DIR/code"
2016-03-07 06:11:37 +00:00
make clean
make release
popd
2016-03-07 19:37:48 +00:00
cp -r "${TEMPLATE_DIR}" "$TMP_DIR/alpha"
cp ./4ed ./4ed_app.so "$TMP_DIR/alpha/"
cp ./code/README.txt ./code/TODO.txt "$TMP_DIR/alpha/"
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
pushd "$TMP_DIR"
zip -r "$OUT_ZIP" "$(basename alpha)"
popd
2016-03-07 19:37:48 +00:00
rm -rf "$TMP_DIR/alpha"
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 19:37:48 +00:00
# SUPER-32
pushd "$CODE_DIR/code"
2016-03-07 07:17:46 +00:00
make clean
2016-03-07 19:37:48 +00:00
make release32_super
popd
2016-03-07 19:37:48 +00:00
cp ./4ed ./4ed_app.so ./code/4coder_*.h ./code/4coder_*.cpp "$TMP_DIR/super/"
cp ./code/buildsuper.sh "$TMP_DIR/super/"
cp ./code/README.txt ./code/SUPERREADME.txt ./code/TODO.txt "$TMP_DIR/super/"
2016-06-24 20:43:49 +00:00
cp ./code/*.html "$TMP_DIR/super/"
2016-03-07 06:11:37 +00:00
2016-03-07 07:17:46 +00:00
echo " "
2016-03-07 19:37:48 +00:00
pushd "$TMP_DIR"
zip -r "$OUT_ZIP_SUPER_32" "$(basename super)"
popd
rm -rf "$TMP_DIR/super"
echo " "
# SUPER-64
pushd "$CODE_DIR/code"
2016-03-07 07:17:46 +00:00
make clean
2016-03-07 19:37:48 +00:00
make release_super
popd
2016-03-07 19:37:48 +00:00
cp -r "${TEMPLATE_DIR}" "$TMP_DIR/super/"
cp ./4ed ./4ed_app.so ./code/4coder_*.h ./code/4coder_*.cpp "$TMP_DIR/super/"
cp ./code/buildsuper.sh "$TMP_DIR/super/"
cp ./code/README.txt ./code/SUPERREADME.txt ./code/TODO.txt "$TMP_DIR/super/"
2016-06-24 20:43:49 +00:00
cp ./code/*.html "$TMP_DIR/super/"
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
pushd "$TMP_DIR"
zip -r "$OUT_ZIP_SUPER" "$(basename super)"
popd
2016-03-07 19:37:48 +00:00
rm -rf "$TMP_DIR/super"
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
2016-03-07 19:37:48 +00:00
echo "Created linux 4coder packages"
2016-03-07 07:17:46 +00:00
exit
2016-03-07 06:11:37 +00:00