summaryrefslogtreecommitdiff
path: root/db-remove
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-05-24 12:35:53 -0600
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-05-25 00:45:25 -0600
commit0be51cb3e78592984ea8152cac176448d1765fb0 (patch)
tree23ea9e5e3e642d7eb0a485b82b76ed6c603c7885 /db-remove
parent7efc4b2b48f9ed1669a17b3cd307db0f17e193e9 (diff)
db-remove: pull the path ${SVNREPO}/$repo/$pkgbase into a variable.
This way, if it changes, it only needs to be changed in one place.
Diffstat (limited to 'db-remove')
-rwxr-xr-xdb-remove5
1 files changed, 3 insertions, 2 deletions
diff --git a/db-remove b/db-remove
index 2f18ff7..53fdb2a 100755
--- a/db-remove
+++ b/db-remove
@@ -30,8 +30,9 @@ remove_pkgs=()
for pkgbase in "${pkgbases[@]}"; do
msg "Removing %s from [%s]..." "$pkgbase" "$repo"
- if [ -d "${SVNREPO}/$repo/$pkgbase" ]; then
- remove_pkgs+=($(. "${SVNREPO}/$repo/$pkgbase/PKGBUILD"; echo "${pkgname[@]}"))
+ path="${SVNREPO}/$repo/$pkgbase"
+ if [ -d "$path" ]; then
+ remove_pkgs+=($(. "$path/PKGBUILD"; echo "${pkgname[@]}"))
else
warning "%s not found in ABS(libre)" "$pkgbase"
warning "Removing only %s from the repo" "$pkgbase"