diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/pm-action | 6 | ||||
-rw-r--r-- | src/pm-is-supported | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/pm-action b/src/pm-action index 7c2643b..c3e8cc4 100755 --- a/src/pm-action +++ b/src/pm-action @@ -27,7 +27,7 @@ # The rule here? Simplicity. help_options() { - echo "$(basename "$0") [options]" + echo "${0##*/} [options]" echo echo "Options can change how the supend or hibernate is done." echo @@ -89,9 +89,7 @@ done [ -f /sys/power/state ] || exit 1 -ACTION=$(basename "$0") -ACTION=${ACTION#pm-} -ACTION=${ACTION/-/_} +ACTION=${0##*pm-} case "$ACTION" in suspend) diff --git a/src/pm-is-supported b/src/pm-is-supported index 4f7e267..0bed480 100644 --- a/src/pm-is-supported +++ b/src/pm-is-supported @@ -23,7 +23,7 @@ help_options() { export LC_COLLATE=C -ARG=${1#--} +ARG="${1#--}" [ -f /sys/power/state ] || exit 1 |