summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorDave Reisner <d@falconindy.com>2011-06-07 02:02:32 +0200
committerDave Reisner <d@falconindy.com>2011-06-19 23:33:34 +0200
commit7592c32bda5dc3bc45a98b1ddd91be52963b5be2 (patch)
treee21fce73e0f6da5be4391fd91d2f766f0d3a1650 /Makefile
parentf2988f2bea65e345fd58e0e413b9eef4359d196b (diff)
downloadmkinitcpio-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--Makefile10
1 files changed, 5 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 66e2d8d..b77e088 100644
--- a/Makefile
+++ b/Makefile
@@ -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