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 <