Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/crossrepomove.in
diff options
context:
space:
mode:
Diffstat (limited to 'crossrepomove.in')
-rw-r--r--crossrepomove.in16
1 files changed, 10 insertions, 6 deletions
diff --git a/crossrepomove.in b/crossrepomove.in
index 1be2dc3..b45b8ae 100644
--- a/crossrepomove.in
+++ b/crossrepomove.in
@@ -6,7 +6,7 @@ m4_include(lib/common.sh)
scriptname=${0##*/}
if [[ -z $1 ]]; then
- echo 'Usage: '$scriptname' [pkgbase]'
+ printf 'Usage: %s [pkgbase]\n' "$scriptname"
exit 1
fi
@@ -38,24 +38,26 @@ target_dbscripts="/srv/repos/svn-${target_name}/dbscripts"
setup_workdir
-pushd $WORKDIR >/dev/null
+pushd "$WORKDIR" >/dev/null
msg "Downloading sources for %s" "${pkgbase}"
svn -q checkout -N "${target_svn}" target_checkout
mkdir -p "target_checkout/${pkgbase}/repos"
svn -q export "${source_svn}/${pkgbase}/trunk" "target_checkout/${pkgbase}/trunk" || die
+# shellcheck source=PKGBUILD.proto
. "target_checkout/${pkgbase}/trunk/PKGBUILD"
msg "Downloading packages for %s" "${pkgbase}"
-for _arch in ${arch[@]}; do
+for _arch in "${arch[@]}"; do
if [[ "${_arch[*]}" == 'any' ]]; then
repo_arch='x86_64'
else
repo_arch=${_arch}
fi
- for _pkgname in ${pkgname[@]}; do
- fullver=$(get_full_version $_pkgname)
+ for _pkgname in "${pkgname[@]}"; do
+ fullver=$(get_full_version "$_pkgname")
pkgpath="/srv/ftp/$source_repo/os/$repo_arch/$_pkgname-$fullver-${_arch}.pkg.tar.*"
+ # shellcheck disable=2029
ssh "$server" "cp $pkgpath staging/$target_repo" || die
done
done
@@ -68,10 +70,12 @@ pushd "target_checkout/${pkgbase}/trunk" >/dev/null
archrelease "${arch[@]/#/$target_repo-}" || die
popd >/dev/null
+# shellcheck disable=2029
ssh "${server}" "${target_dbscripts}/db-update" || die
msg "Removing %s from %s" "${pkgbase}" "${source_repo}"
-for _arch in ${arch[@]}; do
+for _arch in "${arch[@]}"; do
+ # shellcheck disable=2029
ssh "${server}" "${source_dbscripts}/db-remove ${source_repo} ${_arch} ${pkgbase}"
done
svn -q checkout -N "${source_svn}" source_checkout