diff --git a/s3h.sh b/s3h.sh index 88ff667..0912edb 100755 --- a/s3h.sh +++ b/s3h.sh @@ -24,11 +24,13 @@ while [[ -z "$configFile" ]]; do fi # add directory selectors - for d in `find $dir -mindepth 1 -maxdepth 1 -type d -printf "%f\n" |sort`; do + dirs=`find $dir -mindepth 1 -maxdepth 1 ! -name '.*' -type d -printf "%f\n" |sort` + for d in $dirs; do para+=("$d" "<$d>") done # add file selectors - for d in `find $dir -mindepth 1 -maxdepth 1 -type f -printf "%f\n" |sort`; do + files=`find $dir -mindepth 1 -maxdepth 1 ! -name '.*' -type f -printf "%f\n" |sort` + for d in $files; do para+=("$d" "$d") done @@ -53,14 +55,22 @@ done # read config file and connect if [[ -f "$configFile" ]]; then + clear # each line equals one config option para=() while read -r configLine; do para+=($configLine) done < "$configFile" + # lookup group specific option file + if [[ -f "$dir/.options" ]]; then + while read -r configLine; do + para+=($configLine) + done < "$dir/.options" + echo "using group options file '$dir/.options'" + fi + # clear screen // remove dialog colors - clear echo "config file '$configFile' selected. connecting..." # execute ssh