rename bins

This commit is contained in:
kayos@tcp.direct 2022-10-18 23:43:05 -07:00
parent 3de332c1c3
commit 1cb6cb21c8
Signed by: kayos
GPG Key ID: 4B841471B4BEE979
2 changed files with 0 additions and 62 deletions

@ -1,30 +0,0 @@
#!/usr/bin/env bash
set -e
_dir="$( dirname -- "$0" )/.."
_lib="$_dir/lib.sh"
_var="$_dir/var.sh"
source "$_lib"
source "$_var"
if ! $_goahead; then
echo -n "failed to load libs and vars"
exit
fi
echo "preparing to run $* on all nodes"
_self="$(uname -n)"
set +e
echo "running on self"
ssh -n "$_self" "$@"
set -e
get-targets | while read -r line; do
if ! ignore "$line"; then
echo "running on $line"
ssh -n "$line" "$@" &
fi
done

@ -1,32 +0,0 @@
#!/usr/bin/env bash
set -e
source lib.sh
_targetFile="$1"
if ! [[ -f "$_targetFile" ]]; then
echo -n "file not found: $1"
exit 1
fi
echo "preparing to copy $1 to all nodes"
_targetDir=":"
if [[ -z "$2" ]]; then
_targetDir+="~"
else
_targetDir+="$2"
fi
echo -n "target directory: '"
echo -n "$_targetDir" | tr -d ':'
echo "'"
get-targets | while read -r line; do
if ! ignore "$line"; then
echo "copying to $line"
scp "$_targetFile" "$line$_targetDir"
fi
done