From 4f3c8cf642a2c677a375d79e6565386dba0cf1e3 Mon Sep 17 00:00:00 2001 From: poikilos <7557867+poikilos@users.noreply.github.com> Date: Thu, 10 Oct 2019 20:32:54 -0400 Subject: [PATCH] improve MultiCraft installer --- build-MultiCraft.sh | 1841 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 1826 insertions(+), 15 deletions(-) diff --git a/build-MultiCraft.sh b/build-MultiCraft.sh index 092cffd..8f17df2 100755 --- a/build-MultiCraft.sh +++ b/build-MultiCraft.sh @@ -5,14 +5,71 @@ # cmake . -DOpenGL_GL_PREFERENCE=GLVND && make me="$0" -OFFLINE=false -if [ "@$1" = "@--offline" ]; then - OFFLINE=true + +if [ -z "$PREFIX" ]; then + PREFIX=~/.local fi -if [ "@$2" = "@--offline" ]; then - OFFLINE=true + +# This is NOT a mistake (MultiCraft is the git username)... +GIT_REPOS_DIR="$HOME/Downloads/git/MultiCraft" +# ...so srcRepo should be MultiCraft/MultiCraft in this case +# (unless user ran script from a directory containing their own +# MultiCraft directory). +srcRepo="`pwd`/MultiCraft" +if [ ! -d "$srcRepo" ]; then + srcRepo="$GIT_REPOS_DIR/MultiCraft" + if [ ! -d "$GIT_REPOS_DIR" ]; then + mkdir -p "$GIT_REPOS_DIR" || customDie echo "mkdir -p '$GIT_REPOS_DIR' FAILED." + fi fi +if [ ! -d /tmp/MultiCraft ]; then + mkdir /tmp/MultiCraft || customDie echo "mkdir -p '/tmp/MultiCraft' FAILED." +fi +artifactsPath=/tmp/MultiCraft/src.txt +cat > $artifactsPath < $manifestPath < $dstShortcut <