diff options
author | Stefan Fritsch <sf@sfritsch.de> | 2012-03-31 22:39:31 +0200 |
---|---|---|
committer | Stefan Fritsch <sf@sfritsch.de> | 2012-03-31 22:39:31 +0200 |
commit | 07daea46c5cb2eff8691f1597ddeb6e153bf42c7 (patch) | |
tree | 1ccca677392404c8519febd934f70102c84f3a8b | |
parent | 38a0b650053e337ff75ffc223d9d60bd926e242d (diff) | |
download | apache2-07daea46c5cb2eff8691f1597ddeb6e153bf42c7.tar.gz |
replace some use of sed with shell constructs
-rw-r--r-- | debian/debhelper/apache2-maintscript-helper | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/debian/debhelper/apache2-maintscript-helper b/debian/debhelper/apache2-maintscript-helper index fa8ae062..cdf27653 100644 --- a/debian/debhelper/apache2-maintscript-helper +++ b/debian/debhelper/apache2-maintscript-helper @@ -31,8 +31,7 @@ else return 1 fi - APACHE2_MAINTSCRIPT_NAME="$0" - APACHE2_MAINTSCRIPT_NAME=$(echo "$APACHE2_MAINTSCRIPT_NAME" | sed -re 's#^.*?\.(\w+)#\1#' ) + APACHE2_MAINTSCRIPT_NAME="${0##*.}" case "$APACHE2_MAINTSCRIPT_NAME" in preinst|prerm|postrm|postinst) # yay - recognized script @@ -43,8 +42,8 @@ else ;; esac - APACHE2_MAINTSCRIPT_PACKAGE="$0" - APACHE2_MAINTSCRIPT_PACKAGE=$(echo "$APACHE2_MAINTSCRIPT_PACKAGE" | sed -re 's#^.+/(.*)\.\w+$#\1#' ) + APACHE2_MAINTSCRIPT_PACKAGE="${0##*/}" + APACHE2_MAINTSCRIPT_PACKAGE="${APACHE2_MAINTSCRIPT_PACKAGE%.*}" APACHE2_MAINTSCRIPT_METHOD="$1" APACHE2_MAINTSCRIPT_ARGUMENT="$2" @@ -202,7 +201,7 @@ apache2_switch_mpm() [ -x /usr/sbin/a2enmod ] || return 1 local MPM="$1" - MPM=$(echo "$MPM" | sed -e 's/^mpm_//') + MPM="${MPM#mpm_}" if ! apache2_needs_action ; then |