aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2013-09-14 17:04:05 +1200
committerTom Ryder <tom@sanctum.geek.nz>2013-09-14 17:42:03 +1200
commit604de244454bae91ac073360b95ac8d52e52a39c (patch)
treed033cf0de74d0c4b8837394d4fc6f0819096f60b
parentLoop through commands rather than repeating (diff)
downloadpsshd-604de244454bae91ac073360b95ac8d52e52a39c.tar.gz
psshd-604de244454bae91ac073360b95ac8d52e52a39c.zip
Use consistent if/for/while block syntax
-rwxr-xr-xpsshd6
1 files changed, 2 insertions, 4 deletions
diff --git a/psshd b/psshd
index 5d372c8..8ad9bff 100755
--- a/psshd
+++ b/psshd
@@ -30,8 +30,7 @@ for cmd in "${cmds[@]}"; do
done
# Get port in options
-while getopts ':p:' opt
-do
+while getopts ':p:' opt; do
case "$opt" in
p)
port="$OPTARG"
@@ -49,8 +48,7 @@ done
shift "$((OPTIND-1))"
# If no port, give up with usage instructions
-if [[ ! -n "$port" ]]
-then
+if [[ ! -n "$port" ]]; then
printf "USAGE: $0 -p <port number> -- <ssh arguments>\n"
exit 1
fi