summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndres P <aepd87@gmail.com>2010-05-26 11:35:40 -0430
committerAllan McRae <allan@archlinux.org>2010-06-17 14:34:57 +1000
commitf258ffab257010524cc7619907401b500923e439 (patch)
treee7d7dce00c5a2f7142b46e8c25cf166751d45edf
parent95145d4c52e5a6bb22fbb396f5d6584a7e87b75b (diff)
downloadpacman-f258ffab257010524cc7619907401b500923e439.tar.xz
makepkg: use double brackets
Change all instances of the (test) [ builtin to the [[ keyword. Signed-off-by: Andres P <aepd87@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
-rw-r--r--scripts/makepkg.sh.in10
1 files changed, 4 insertions, 6 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index a886c6d9..28659b55 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1273,7 +1273,7 @@ check_sanity() {
if (( ${#pkgname[@]} > 1 )); then
for pkg in ${pkgname[@]}; do
- if [ "$(type -t package_${pkg})" != "function" ]; then
+ if [[ $(type -t package_${pkg}) != "function" ]]; then
error "$(gettext "missing package function for split package '%s'")" "$pkg"
return 1
fi
@@ -1782,14 +1782,12 @@ if (( ${#pkgname[@]} > 1 )); then
fi
# test for available PKGBUILD functions
-# The exclamation mark is required here to avoid triggering the ERR trap when
-# a tested function does not exist.
-if [[ $(! type -t build) = "function" ]]; then
+if [[ $(type -t build) = "function" ]]; then
BUILDFUNC=1
fi
-if [ "$(type -t package)" = "function" ]; then
+if [[ $(type -t package) = "function" ]]; then
PKGFUNC=1
-elif [ $SPLITPKG -eq 0 -a "$(type -t package_${pkgname})" = "function" ]; then
+elif [[ $SPLITPKG -eq 0 && $(type -t package_${pkgname}) = "function" ]]; then
SPLITPKG=1
fi