scripts/deploy: allow omitting the "host" argument
This commit is contained in:
@@ -2,9 +2,10 @@
|
||||
#!nix-shell -i bash -p bash -p rsync -p sane-scripts.sync-music
|
||||
|
||||
usage() {
|
||||
echo "sync [flags ...] <host> [<host> ...] [passthrough flags ...]"
|
||||
echo "sync [flags ...] [<host> [<host> ...]] [passthrough flags ...]"
|
||||
echo "where:"
|
||||
echo " host: all|desko|lappy|moby"
|
||||
echo " - defaults to 'all' if omitted"
|
||||
exit 1
|
||||
}
|
||||
|
||||
@@ -100,7 +101,12 @@ parseArgs() {
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
passthruArgs+=("$@")
|
||||
|
||||
if [[ ${#hosts[@]} -eq 0 ]]; then
|
||||
hosts+=(desko lappy moby)
|
||||
fi
|
||||
}
|
||||
|
||||
parseArgs "$@"
|
||||
|
Reference in New Issue
Block a user