From bec95eeaee02dffb0f1750b9ca2641378bbe9df9 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 20 Jun 2014 22:00:01 -0400 Subject: I think xbs is in a workable stage. --- src/xbs-abs/helper-abs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/xbs-abs/helper-abs') 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 # @@ -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 -- cgit v1.2.2