diff options
author | Dave Reisner <d@falconindy.com> | 2011-06-07 02:02:32 +0200 |
---|---|---|
committer | Dave Reisner <d@falconindy.com> | 2011-06-19 23:33:34 +0200 |
commit | 7592c32bda5dc3bc45a98b1ddd91be52963b5be2 (patch) | |
tree | e21fce73e0f6da5be4391fd91d2f766f0d3a1650 /Makefile | |
parent | f2988f2bea65e345fd58e0e413b9eef4359d196b (diff) | |
download | mkinitcpio-7592c32bda5dc3bc45a98b1ddd91be52963b5be2.tar.gz mkinitcpio-7592c32bda5dc3bc45a98b1ddd91be52963b5be2.tar.xz |
mkinitcpio: bashification, part 1/2
Always use bash's [[ ]], and apply (( )) where arithmetic calculations
are made. We also take a few other bash shortcuts to simplify code where
possible.
We also touch the Makefile here to adjust the sed'ing for directory
names.
Signed-off-by: Dave Reisner <d@falconindy.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -19,11 +19,11 @@ all: doc install: all $(foreach dir,${DIRS},install -dm755 ${DESTDIR}${dir};) - sed -e 's|CONFIG="mkinitcpio.conf"|CONFIG="/etc/mkinitcpio.conf"|g' \ - -e 's|FUNCTIONS="functions"|FUNCTIONS="/lib/initcpio/functions"|g' \ - -e 's|HOOKDIR="hooks"|HOOKDIR="/lib/initcpio/hooks"|g' \ - -e 's|INSTDIR="install"|INSTDIR="/lib/initcpio/install"|g' \ - -e 's|PRESETDIR="mkinitcpio.d"|PRESETDIR="/etc/mkinitcpio.d"|g' \ + sed -e 's|^CONFIG=.*|CONFIG=/etc/mkinitcpio.conf|' \ + -e 's|^FUNCTIONS=.*|FUNCTIONS=/lib/initcpio/functions|' \ + -e 's|^HOOKDIR=.*|HOOKDIR=/lib/initcpio/hooks|' \ + -e 's|^INSTDIR=.*|INSTDIR=/lib/initcpio/install|' \ + -e 's|^PRESETDIR=.*|PRESETDIR=/etc/mkinitcpio.d|' \ < mkinitcpio > ${DESTDIR}/sbin/mkinitcpio sed "s|%VERSION%|${VERSION}|g" < lsinitcpio > ${DESTDIR}/bin/lsinitcpio |