summaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-06-04 15:02:05 +0200
committerDave Reisner <dreisner@archlinux.org>2012-06-08 23:38:57 +0200
commit0edc1a90713bd208ab48190cf1a1cae1158f6e7b (patch)
tree1063445b3a2c18a13c5ec281f1767eb1a546b923 /functions
parent5b99f78331f567cc1442460efc054b72c45306a6 (diff)
downloadmkinitcpio-0edc1a90713bd208ab48190cf1a1cae1158f6e7b.tar.gz
mkinitcpio-0edc1a90713bd208ab48190cf1a1cae1158f6e7b.tar.xz
Use declare -f over type -t to avoid subshells
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'functions')
-rw-r--r--functions2
1 files changed, 1 insertions, 1 deletions
diff --git a/functions b/functions
index 14c6637..4a62d8e 100644
--- a/functions
+++ b/functions
@@ -633,7 +633,7 @@ run_build_hook() {
return 1
fi
- if [[ $(type -t build) != function ]]; then
+ if ! declare -f build >/dev/null; then
error 'Hook '$script' has no build function'
return 1
fi