From 3e0f52b4e4ca15e6e21c2e781287f568a2b54791 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Wed, 19 Jul 2023 13:50:02 -0400 Subject: [PATCH] install-scripts.zsh: Various Updates * Use $BIN from common.zsh * Fixes for colorful output * Install scripts to .local/bin on the remote machine * Point setup.zsh at .local/bin instead of .bin * Run setup/testdirs.zsh with the -e flag Signed-off-by: Anna Schumaker --- install-scripts.zsh | 10 +++++----- setup.zsh | 3 ++- setup/testdirs.zsh | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/install-scripts.zsh b/install-scripts.zsh index 8e50104..82efb88 100755 --- a/install-scripts.zsh +++ b/install-scripts.zsh @@ -1,19 +1,19 @@ #!/bin/zsh +source common.zsh -BIN=$HOME/bin SCRIPTS=(grub-list.zsh setup.zsh setup/ run/) function install_script() { - ssh $1 mkdir -p bin/{setup,run} + ssh $1 mkdir -p .local/bin/{setup,run} echo -n "$2 Copying files ..." for script in $SCRIPTS; do - scp -qr $BIN/$script $1:bin/ + scp -qr $BIN/$script $1:.local/bin/ done - ssh $1 cp bin/setup.zsh bin/run.zsh + ssh $1 cp .local/bin/setup.zsh .local/bin/run.zsh echo " done" } -tags=($(python $BIN/colors/vm.py $*)) +tags=($(FORCE_COLOR=1 python $COLORS/vm.py $*)) for ((i=1; i<=${#@}; i++)); do install_script ${@[i]} ${tags[i]} done diff --git a/setup.zsh b/setup.zsh index 83cfe1f..1b2cb4a 100755 --- a/setup.zsh +++ b/setup.zsh @@ -1,6 +1,7 @@ #!/bin/zsh +BIN=.local/bin -[[ "$(basename $0)" == "run.zsh" ]] && TARGET=bin/run || TARGET=bin/setup +[[ "$(basename $0)" == "run.zsh" ]] && TARGET=$BIN/run || TARGET=$BIN/setup TARGET=$TARGET/$1 shift diff --git a/setup/testdirs.zsh b/setup/testdirs.zsh index 0b9f769..48039d6 100755 --- a/setup/testdirs.zsh +++ b/setup/testdirs.zsh @@ -1,4 +1,4 @@ -#!/bin/zsh +#!/bin/zsh -e SERVER=$1 EXPORT=$2 MOUNTPOINT=$3