gw installation script

install to $GWS/opt/
This commit is contained in:
Martin Blazik
2022-09-24 12:22:49 +02:00
committed by lachtan
parent efca114ee1
commit 5279dc7e67
2 changed files with 19 additions and 5 deletions

2
bashrc
View File

@@ -15,4 +15,6 @@ for rc_file in $WORKSPACE/rc/*.sh; do
done done
append_path "$LWS/bin" append_path "$LWS/bin"
append_path "$LWS/opt/bin"
set_uniq_path set_uniq_path

View File

@@ -2,11 +2,23 @@
# https://github.com/To-da/gdub # https://github.com/To-da/gdub
set -x
set -e set -e
set -u
cd $HOME/src/other readonly REPO="https://github.com/To-da/gdub.git"
git clone https://github.com/To-da/gdub.git readonly GW_PATH="$LWS/opt/gdub"
cd gdub readonly GW_BIN="$GW_PATH/bin/gw"
sudo ./install 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/"