diff options
Diffstat (limited to 'hm/soispha/conf/lf/commands/scripts/mk_scr_default.sh')
-rwxr-xr-x | hm/soispha/conf/lf/commands/scripts/mk_scr_default.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hm/soispha/conf/lf/commands/scripts/mk_scr_default.sh b/hm/soispha/conf/lf/commands/scripts/mk_scr_default.sh index 915725cc..7ca3759e 100755 --- a/hm/soispha/conf/lf/commands/scripts/mk_scr_default.sh +++ b/hm/soispha/conf/lf/commands/scripts/mk_scr_default.sh @@ -14,9 +14,9 @@ id="$id" prompt "Script name: " name="" -while [ -z "$name" ] || [ -e "$name" ]; do +while [ -z "$name" ] || [ -e "$name.sh" ]; do read -r name - if [ -e "$name" ]; then + if [ -e "$name.sh" ]; then prompt "Script already exists, overwrite [y|N]: " read -r ans @@ -30,7 +30,7 @@ done script="$(pwd)"/"$name" -cat "%SHELL_LIBRARY_TEMPLATE" >"$script" +cat "%SHELL_LIBRARY_TEMPLATE" >"$script.sh" chmod +x "$script" "$VISUAL" "$script" |