Simplify parameter expansion in pm-action and pm-is-supported.
On Jan 27, 2008 2:53 PM, Victor Lowther <[EMAIL PROTECTED]> wrote:
> nullglob is a bashism. POSIX does not have it, and the previous
> patches have gotten rid of our dependency on it.
>
diff -U 0 -rNX diffignore pm-utils.updates/src/pm-action working/src/pm-action
--- pm-utils.updates/src/pm-action 2008-01-27 11:58:02.000000000 -0600
+++ working/src/pm-action 2008-01-17 20:56:28.000000000 -0600
@@ -30 +30 @@
- echo "$(basename "$0") [options]"
+ echo "${0##*/} [options]"
@@ -92,3 +92 @@
-ACTION=$(basename "$0")
-ACTION=${ACTION#pm-}
-ACTION=${ACTION/-/_}
+ACTION=${0##*pm-}
diff -U 0 -rNX diffignore pm-utils.updates/src/pm-is-supported working/src/pm-is-supported
--- pm-utils.updates/src/pm-is-supported 2008-01-27 11:58:02.000000000 -0600
+++ working/src/pm-is-supported 2008-01-17 20:56:57.000000000 -0600
@@ -26 +26 @@
-ARG=${1#--}
+ARG="${1#--}"
_______________________________________________
Pm-utils mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pm-utils