aboutsummaryrefslogtreecommitdiff
path: root/ssync-index
diff options
context:
space:
mode:
authorSteph Enders <steph@senders.io>2025-12-13 23:50:51 -0500
committerSteph Enders <steph@senders.io>2025-12-13 23:54:06 -0500
commit21424b25438059a39dcdcd94ea31b6746e5c69d2 (patch)
treecfcaf198103276b1ab04ab096fb6dddb300656ca /ssync-index
parent9e143acfdfc9e69997d46c71cc52a0947d572a2c (diff)
Initial work on making scripts work in non-bash envs
Replace function defs with dash legal function syntax: function fn { } -> fn() { }
Diffstat (limited to 'ssync-index')
-rwxr-xr-xssync-index10
1 files changed, 5 insertions, 5 deletions
diff --git a/ssync-index b/ssync-index
index a823093..8c29758 100755
--- a/ssync-index
+++ b/ssync-index
@@ -18,12 +18,12 @@ USAGE="ssync-index [options] ROOT_DIR
-h print this message"
# HELPER METHODS
-function verbose_log {
+verbose_log() {
if [ ! -z "$VERBOSE_FLAG" ]; then
echo "$1"
fi
}
-function lines {
+lines() {
wc -l $1 | cut -d' ' -f1
}
@@ -89,9 +89,9 @@ if [ -z "$REMOTE_HOST_ARG" ]; then
fi
# Option Validation
-output_to=
-if [ ! -z "$OUTPUT_FILE_FLAG" ]; then
- output_to="> $OUTPUT_FILE_ARG"
+if [ -z "$OUTPUT_FILE_FLAG" ]; then
+ echo "-o output file required"
+ exit 1
fi
keyfile_cmd=""