From 21424b25438059a39dcdcd94ea31b6746e5c69d2 Mon Sep 17 00:00:00 2001 From: Steph Enders Date: Sat, 13 Dec 2025 23:50:51 -0500 Subject: Initial work on making scripts work in non-bash envs Replace function defs with dash legal function syntax: function fn { } -> fn() { } --- ssync-index | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ssync-index') 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="" -- cgit v1.2.3-54-g00ecf