From 29098d750baa5563975f13d6465772dac4ab2167 Mon Sep 17 00:00:00 2001 From: Miles Alan Date: Tue, 9 Jun 2020 20:18:35 -0500 Subject: [PATCH] Allow sxmo_files.sh script to be called with $1 as startdir --- scripts/appscripts/sxmo_files.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/appscripts/sxmo_files.sh b/scripts/appscripts/sxmo_files.sh index 4281419..144b338 100755 --- a/scripts/appscripts/sxmo_files.sh +++ b/scripts/appscripts/sxmo_files.sh @@ -1,6 +1,8 @@ #!/usr/bin/env sh EDITOR=vis -cd "/home/$USER/" || exit 1 +DIR="$1" +[ -z "$DIR" ] && DIR="/home/$USER/" +cd "$DIR" || exit 1 handlefiles() { if echo "$1" | grep -iE ".(webm|ogg|mp4|mov|avi)$"; then