summaryrefslogtreecommitdiff
path: root/src/xbs-abs/helper-abs
diff options
context:
space:
mode:
Diffstat (limited to 'src/xbs-abs/helper-abs')
-rwxr-xr-xsrc/xbs-abs/helper-abs14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/xbs-abs/helper-abs b/src/xbs-abs/helper-abs
index d2baf42..387c1a6 100755
--- a/src/xbs-abs/helper-abs
+++ b/src/xbs-abs/helper-abs
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env bash
# Copyright (C) 2013 Luke Shumaker <lukeshu@sbcglobal.net>
#
@@ -140,8 +140,8 @@ move() {
local arches=()
# this is based off code from dbscripts:db-move
for pkgarch in "${ARCHES[@]}" 'any'; do
- dir_from="${svndir}/repos/${repo_from}-${pkgarch}"
- dir_to="${svndir}/repos/${repo_to}-${pkgarch}"
+ local dir_from="${svndir}/repos/${repo_from}-${pkgarch}"
+ local dir_to="${svndir}/repos/${repo_to}-${pkgarch}"
if [ -f "${dir_from}/PKGBUILD" ]; then
if [ -d "${dir_to}" ]; then
@@ -153,6 +153,7 @@ move() {
arch_svn add -q "${dir_to}"
fi
+ local file
for file in $(arch_svn ls "${dir_from}"); do
arch_svn mv -q -r HEAD "${dir_from}/$file@" "${dir_to}/"
done
@@ -174,7 +175,12 @@ releasepath() {
load_config
local svndir="${SVNDIR}/$(pac2svn "$repo")/${pkgbase}"
arch_svn up -q "${svndir}"
- echo "${svndir}/repos/${repo}-${arch}"
+ local releasepath="${svndir}/repos/${repo}-${arch}"
+ if [[ -f "${releasepath}/PKGBUILD" ]]; then
+ printf '%s\n' "$releasepath"
+ return 0
+ fi
+ return 1
}
case "$1" in