From 3f4c2e4f1f3d28981e5121af97206cdc85427042 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 2 May 2017 22:30:19 -0400 Subject: libredbdiff: make repos be a true array, make it configurable --- src/abslibre-tools/libredbdiff | 8 +++----- src/abslibre-tools/libredbdiff.conf | 2 ++ 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/abslibre-tools') diff --git a/src/abslibre-tools/libredbdiff b/src/abslibre-tools/libredbdiff index 924b9f4..6a56f06 100755 --- a/src/abslibre-tools/libredbdiff +++ b/src/abslibre-tools/libredbdiff @@ -35,8 +35,6 @@ dbpatharch="$basedbpath/pacman.archlinux" mirrorlist="$baseconfpath/mirrorlist.parabola" mirrorlistarch="$baseconfpath/mirrorlist.archlinux" -repos="libre pcr libre-multilib nonprism" - field_pkgname_parabola=30 field_pkgname_arch=30 @@ -157,7 +155,7 @@ initialize() { } repo_test() { - for repo in ${repos} ; do + for repo in "${repos[@]}" ; do if [[ $repo == "$1" ]] ; then found=1 return 0 @@ -313,7 +311,7 @@ main() { "$name" "$name" "$cmd" return 0 else - check_vars libredbdiff statedir || exit 1 + check_vars libredbdiff statedir repos || exit 1 filenotfound "${dbpath}/sync/libre.db" filenotfound "${dbpatharch}/sync/core.db" @@ -342,7 +340,7 @@ main() { if [[ ${repo_arg} ]] ; then print_cmp "${repo_arg}" else - for repo in ${repos} ; do + for repo in "${repos[@]}" ; do echo "[$repo]" print_cmp "$repo" done diff --git a/src/abslibre-tools/libredbdiff.conf b/src/abslibre-tools/libredbdiff.conf index 18bc643..4ec024b 100644 --- a/src/abslibre-tools/libredbdiff.conf +++ b/src/abslibre-tools/libredbdiff.conf @@ -5,3 +5,5 @@ statedir='/var/lib/libredbdiff' mirror='http://repo.parabola.nu/$repo/os/$arch' mirrorarch='http://mirrors.kernel.org/archlinux/$repo/os/$arch' + +repos=(libre pcr libre-multilib nonprism) -- cgit v1.2.2