Move installation scripts to install/ dir

This commit is contained in:
lachtan
2024-09-01 16:24:15 +02:00
parent 36b28ae72e
commit 420f85e31e
25 changed files with 14 additions and 30 deletions

24
install/gw.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
# https://github.com/To-da/gdub
set -e
set -u
readonly REPO="https://github.com/To-da/gdub.git"
readonly GW_PATH="$LWS/opt/gdub"
readonly GW_BIN="$GW_PATH/bin/gw"
readonly OPT_BIN_PATH="$LWS/opt/bin"
if [[ -f "$OPT_BIN_PATH/gw" ]]; then
echo "gw already installed"
exit 0
fi
if [[ ! -d "$GW_PATH" ]]; then
git clone "$REPO" "$GW_PATH"
fi
if [[ ! -d "$OPT_BIN_PATH" ]]; then
mkdir "$OPT_BIN_PATH"
fi
cp "$GW_BIN" "$OPT_BIN_PATH/"