summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-05-26 21:45:26 +0200
committerDave Reisner <dreisner@archlinux.org>2012-06-08 23:38:57 +0200
commit02fce512378d15722858d462f4a09584a32e8c69 (patch)
tree9d89e873b692d9cfa45707fbafd1ced096f383b2
parente67684cb43e1ca42aa87aea8cdb4fdff093b7a6b (diff)
downloadmkinitcpio-02fce512378d15722858d462f4a09584a32e8c69.tar.gz
mkinitcpio-02fce512378d15722858d462f4a09584a32e8c69.tar.xz
avoid reliance on sed, embrace awk
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rw-r--r--PKGBUILD4
-rw-r--r--install/autodetect2
2 files changed, 3 insertions, 3 deletions
diff --git a/PKGBUILD b/PKGBUILD
index a9df378..40a2f85 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,8 +9,8 @@ groups=('base')
conflicts=('mkinitcpio')
provides=("mkinitcpio=$pkgver")
depends=('mkinitcpio-busybox>=1.19.4-2' 'kmod' 'util-linux>=2.21' 'libarchive' 'coreutils'
- 'bash' 'findutils' 'sed' 'grep' 'filesystem>=2011.10-1' 'udev>=177-1' 'file' 'gzip')
-makedepends=('asciidoc' 'git')
+ 'awk' 'bash' 'findutils' 'grep' 'filesystem>=2011.10-1' 'udev>=177-1' 'file' 'gzip')
+makedepends=('asciidoc' 'git' 'sed')
optdepends=('xz: Use lzma or xz compression for the initramfs image'
'bzip2: Use bzip2 compression for the initramfs image'
'lzop: Use lzo compression for the initramfs image'
diff --git a/install/autodetect b/install/autodetect
index 1daa429..b2d3687 100644
--- a/install/autodetect
+++ b/install/autodetect
@@ -41,7 +41,7 @@ build() {
md_devs=(/sys/class/block/md*/md/level)
if [[ -e $md_devs ]]; then
(( !QUIET )) && plain "found %d mdadm arrays to scan" "${#md_devs[*]}"
- sed 's/^raid[456]$/raid456/' "${md_devs[@]}" | sort -u >>"$MODULE_FILE"
+ awk '{ gsub(/raid[456]/, "raid456"); print; }' "${md_devs[@]}" | sort -u >>"$MODULE_FILE"
fi
if (( !QUIET )) && [[ -s $MODULE_FILE ]]; then