Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/src/lib/common.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/common.sh')
-rw-r--r--src/lib/common.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/common.sh b/src/lib/common.sh
index 7d04c25..641dea5 100644
--- a/src/lib/common.sh
+++ b/src/lib/common.sh
@@ -354,6 +354,14 @@ is_debug_package() {
[[ ${pkgdesc} == "Detached debugging symbols for "* && ${pkgbase}-debug = "${pkgname}" ]]
}
+# Proxy function to check if a file exists. Using [[ -f ... ]] directly is not
+# always wanted because we might want to expand bash globs first. This way we
+# can pass unquoted globs to is_globfile() and have them expanded as function
+# arguments before being checked.
+is_globfile() {
+ [[ -f $1 ]]
+}
+
join_by() {
local IFS="$1"
shift