diff options
author | ene <ene@sils.li> | 2023-02-19 21:29:01 +0100 |
---|---|---|
committer | ene <ene@sils.li> | 2023-02-19 21:30:25 +0100 |
commit | 9108d474af7776767d93eb933ff4b0b09772917a (patch) | |
tree | 0f8706dd91d9f6b9242717e482e41f8b6b24ed8e /home-manager/config/lf/cmds/mk_scr.sh | |
parent | Fix(bootstrap): Fix a copy and paste oversight (diff) | |
download | nixos-config-9108d474af7776767d93eb933ff4b0b09772917a.tar.gz nixos-config-9108d474af7776767d93eb933ff4b0b09772917a.zip |
Feat(lf): Add dependencies for the shell scripts
Diffstat (limited to 'home-manager/config/lf/cmds/mk_scr.sh')
-rw-r--r-- | home-manager/config/lf/cmds/mk_scr.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/home-manager/config/lf/cmds/mk_scr.sh b/home-manager/config/lf/cmds/mk_scr.sh index 4b80e564..0441c63f 100644 --- a/home-manager/config/lf/cmds/mk_scr.sh +++ b/home-manager/config/lf/cmds/mk_scr.sh @@ -1,27 +1,27 @@ -#!/bin/sh +#!/usr/bin/env dash # shellcheck disable=SC2086 # shellcheck source=/dev/null -. ~/.local/lib/shell/lib +. %SHELL_LIBRARY_PATH star=$(mktmp) cat << EOF > $star -#!/bin/sh +#!/usr/bin/env dash # shellcheck disable=SC2086 # shellcheck source=/dev/null -. ~/.local/lib/shell/lib +. %SHELL_LIBRARY_PATH -LIB_TEMP_DIR_FOR_SCRIPT=$(mktemp -d) +LIB_TEMP_DIR_FOR_SCRIPT=\$(mktemp -d) -if [ -d "$LIB_TEMP_DIR_FOR_SCRIPT" ];then rm -r "$LIB_TEMP_DIR_FOR_SCRIPT"; fi +if [ -d "\$LIB_TEMP_DIR_FOR_SCRIPT" ];then rm -r "\$LIB_TEMP_DIR_FOR_SCRIPT"; fi EOF readp "Script Name: " script_name scr="$(pwd)"/"$script_name" -[ -e $scr ] && die "$script_name exitst, exiting.." +[ -e $scr ] && die "$script_name exist, exiting.." cat "$star" > $scr chmod +x $scr |