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 <Anna.Schumaker@Netapp.com>
This commit is contained in:
parent
c7aad8e77c
commit
3e0f52b4e4
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/zsh
|
||||
#!/bin/zsh -e
|
||||
SERVER=$1
|
||||
EXPORT=$2
|
||||
MOUNTPOINT=$3
|
||||
|
|
Loading…
Reference in New Issue