summaryrefslogtreecommitdiff
path: root/src/abslibre-tools
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-05-02 22:30:19 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2017-05-02 22:50:36 -0400
commit3f4c2e4f1f3d28981e5121af97206cdc85427042 (patch)
tree3d0906575cee3efb03285086ffa5c7c486fef342 /src/abslibre-tools
parentebbde88b7c08a5e9fe9ba8aca1ca2ac2dbd1b41d (diff)
libredbdiff: make repos be a true array, make it configurable
Diffstat (limited to 'src/abslibre-tools')
-rwxr-xr-xsrc/abslibre-tools/libredbdiff8
-rw-r--r--src/abslibre-tools/libredbdiff.conf2
2 files changed, 5 insertions, 5 deletions
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)