diff options
author | Gianni Ceccarelli <gianni.ceccarelli@broadbean.com> | 2020-04-07 17:29:27 +0100 |
---|---|---|
committer | Gianni Ceccarelli <gianni.ceccarelli@broadbean.com> | 2020-04-07 17:29:32 +0100 |
commit | 29105319200ed8dbd1bcbe231b23df78d1e192cf (patch) | |
tree | e389e5a660ae615e5ef91f1cb2cf9dbdf712cf5b /bin/set-screen | |
parent | add make-efi-keys (diff) | |
download | misc-scripts-29105319200ed8dbd1bcbe231b23df78d1e192cf.tar.gz misc-scripts-29105319200ed8dbd1bcbe231b23df78d1e192cf.tar.bz2 misc-scripts-29105319200ed8dbd1bcbe231b23df78d1e192cf.zip |
allow set-screen explicit set
Diffstat (limited to 'bin/set-screen')
-rwxr-xr-x | bin/set-screen | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/set-screen b/bin/set-screen index 57bdd59..f2ffbfd 100755 --- a/bin/set-screen +++ b/bin/set-screen @@ -37,7 +37,11 @@ function make_display_state_dir() { function run_display_state_commands() { local dir - dir="$(display_state_dir)" + if [[ -n "$1" ]]; then + dir="${CONFIG_DIR}/$1" + else + dir="$(display_state_dir)" + fi if [[ -x "${dir}/command" ]]; then if [[ -x "${CONFIG_DIR}/pre-command" ]]; then @@ -68,7 +72,7 @@ EOF case "$1" in 'make') make_display_state_dir "$2" ;; 'which') display_state_dir ;; - '' | 'set') run_display_state_commands ;; + '' | 'set') run_display_state_commands "$2";; 'help' | '--help' ) print_usage ; exit 0 ;; *) >&2 print_usage; exit 1 ;; esac |