aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/hooks/pre-pkg/99-pkglint.sh2
-rw-r--r--common/wrappers/which.sh13
2 files changed, 14 insertions, 1 deletions
diff --git a/common/hooks/pre-pkg/99-pkglint.sh b/common/hooks/pre-pkg/99-pkglint.sh
index 325938f5d54..7e40e81f2b4 100644
--- a/common/hooks/pre-pkg/99-pkglint.sh
+++ b/common/hooks/pre-pkg/99-pkglint.sh
@@ -22,7 +22,7 @@ hook() {
fi
done
- for f in var/run usr/local; do
+ for f in var/run usr/local usr/etc; do
if [ -d ${PKGDESTDIR}/${f} ]; then
msg_red "${pkgver}: /${f} directory is not allowed, remove it!\n"
error=1
diff --git a/common/wrappers/which.sh b/common/wrappers/which.sh
new file mode 100644
index 00000000000..3dc47063b2e
--- /dev/null
+++ b/common/wrappers/which.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+ret=0
+
+while test $# != 0; do
+ case "$1" in
+ -*) ;;
+ *) command -v "$1" || ret=1 ;;
+ esac
+ shift
+done
+
+exit "$ret"