index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
author | Jakub Klinkovský <lahwaacz@archlinux.org> | 2024-01-21 20:13:03 +0100 |
---|---|---|
committer | Christian Heusel <christian@heusel.eu> | 2024-04-30 23:30:47 +0200 |
commit | 952f483574db38b4f39960a9dbafc1bbb387ab0b (patch) | |
tree | 1c7601aa3dce2293b5b341b7b60387837d587e35 /src/lib | |
parent | c484a55cde24457f6a8f6f581f7502da2f873b30 (diff) |
-rw-r--r-- | src/lib/common.sh | 8 |
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 |