summaryrefslogtreecommitdiff
path: root/cron-jobs/check_archlinux
diff options
context:
space:
mode:
Diffstat (limited to 'cron-jobs/check_archlinux')
-rwxr-xr-xcron-jobs/check_archlinux/parse_pkgbuilds.sh22
1 files changed, 11 insertions, 11 deletions
diff --git a/cron-jobs/check_archlinux/parse_pkgbuilds.sh b/cron-jobs/check_archlinux/parse_pkgbuilds.sh
index 3f92169..c8d8618 100755
--- a/cron-jobs/check_archlinux/parse_pkgbuilds.sh
+++ b/cron-jobs/check_archlinux/parse_pkgbuilds.sh
@@ -6,18 +6,18 @@
exit() { return; }
splitpkg_overrides=('depends' 'optdepends' 'provides' 'conflicts')
-variables=('pkgname' 'pkgbase' 'epoch' 'pkgver' 'pkgrel' 'makedepends' 'arch' ${splitpkg_overrides[@]})
+variables=('pkgname' 'pkgbase' 'epoch' 'pkgver' 'pkgrel' 'makedepends' 'arch' "${splitpkg_overrides[@]}")
readonly -a variables splitpkg_overrides
backup_package_variables() {
- for var in ${splitpkg_overrides[@]}; do
+ for var in "${splitpkg_overrides[@]}"; do
indirect="${var}_backup"
eval "${indirect}=(\${$var[@]})"
done
}
restore_package_variables() {
- for var in ${splitpkg_overrides[@]}; do
+ for var in "${splitpkg_overrides[@]}"; do
indirect="${var}_backup"
if [ -n "${!indirect}" ]; then
eval "${var}=(\${$indirect[@]})"
@@ -42,31 +42,31 @@ print_info() {
if [ -n "$arch" ]; then
echo "%ARCH%"
- for i in ${arch[@]}; do echo $i; done
+ for i in "${arch[@]}"; do echo $i; done
echo ""
fi
if [ -n "$depends" ]; then
echo "%DEPENDS%"
- for i in ${depends[@]}; do
+ for i in "${depends[@]}"; do
echo $i
done
echo ""
fi
if [ -n "$makedepends" ]; then
echo "%MAKEDEPENDS%"
- for i in ${makedepends[@]}; do
+ for i in "${makedepends[@]}"; do
echo $i
done
echo ""
fi
if [ -n "$conflicts" ]; then
echo "%CONFLICTS%"
- for i in ${conflicts[@]}; do echo $i; done
+ for i in "${conflicts[@]}"; do echo $i; done
echo ""
fi
if [ -n "$provides" ]; then
echo "%PROVIDES%"
- for i in ${provides[@]}; do echo $i; done
+ for i in "${provides[@]}"; do echo $i; done
echo ""
fi
}
@@ -75,7 +75,7 @@ source_pkgbuild() {
ret=0
dir=$1
pkgbuild=$dir/PKGBUILD
- for var in ${variables[@]}; do
+ for var in "${variables[@]}"; do
unset ${var}
done
source $pkgbuild &>/dev/null || ret=$?
@@ -88,7 +88,7 @@ source_pkgbuild() {
if [ "${#pkgname[@]}" -gt "1" ]; then
pkgbase=${pkgbase:-${pkgname[0]}}
- for pkg in ${pkgname[@]}; do
+ for pkg in "${pkgname[@]}"; do
if [ "$(type -t package_${pkg})" != "function" ]; then
echo -e "%INVALID%\n$pkgbuild\n"
return 1
@@ -98,7 +98,7 @@ source_pkgbuild() {
while IFS= read -r line; do
var=${line%%=*}
var="${var#"${var%%[![:space:]]*}"}" # remove leading whitespace characters
- for realvar in ${variables[@]}; do
+ for realvar in "${variables[@]}"; do
if [ "$var" == "$realvar" ]; then
eval $line
break