28 lines
803 B
Bash
Executable File
28 lines
803 B
Bash
Executable File
# bless you chris and andy <3
|
|
|
|
# DOES NOT WORK AT MOMENT
|
|
|
|
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
MNML_PATH=$(realpath "$DIR/../")
|
|
VERSION=$(<"$MNML_PATH/VERSION")
|
|
|
|
# copy this dir to the tmp build directory and build it
|
|
[[ -n "$BUILD_DIR" ]] || BUILD_DIR="/tmp/mnml/$VERSION"
|
|
[[ -n "$BUILD_PREFIX" ]] || BUILD_PREFIX="/opt/mnml"
|
|
[[ -n "$REPO_DIR" ]] || REPO_DIR="$HOME/mnml"
|
|
|
|
rm -rf "$BUILD_DIR" && mkdir -p "$BUILD_DIR/$BUILD_PREFIX" && cd "$BUILD_DIR/$BUILD_PREFIX"
|
|
|
|
(
|
|
rsync -a --delete --delete-excluded \
|
|
--exclude=".git/" \
|
|
--exclude=".gitignore" \
|
|
--exclude="packaging" \
|
|
"$REPO_DIR/" "$BUILD_DIR/$BUILD_PREFIX/"
|
|
|
|
rsync -a --delete --delete-excluded "$DIR/postinstall" "$BUILD_DIR/$BUILD_PREFIX/"
|
|
|
|
cd "$BUILD_DIR/$BUILD_PREFIX" &&
|
|
make
|
|
)
|