diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2017-04-20 23:05:01 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2017-04-20 23:19:37 -0400 |
commit | cdc456c8b7c6e3eb4b11d668fb9c6e9bdec7230e (patch) | |
tree | d54d0c816a146023fbc7a54c0d5f71ecd0e69937 /src/xbs-abs/helper-abs | |
parent | 23213bda24af601acbbea5731246a055680b48d0 (diff) |
Don't use subshells in local/export/declare commands.
Only make this change in places where it shouldn't make a difference, and
something weird has to be going on for the subshell to fail. This is on
par with checking the return value of malloc. We don't need tests for each
of these failure cases.
Diffstat (limited to 'src/xbs-abs/helper-abs')
-rwxr-xr-x | src/xbs-abs/helper-abs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/xbs-abs/helper-abs b/src/xbs-abs/helper-abs index 85a7fca..e8f41de 100755 --- a/src/xbs-abs/helper-abs +++ b/src/xbs-abs/helper-abs @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright (C) 2013-2014 Luke Shumaker <lukeshu@sbcglobal.net> +# Copyright (C) 2013-2014, 2017 Luke Shumaker <lukeshu@sbcglobal.net> # # For code from db-functions (arch_svn): # Copyright (C) 2012 Pierre Schmitz <pierre@archlinux.de> @@ -98,7 +98,7 @@ release-client() { local arch=$2 # Hack to use arch_svn as 'svn' in external scripts - local tmpdir="$(mktemp -dt "xbs-abs-release.XXXXXXXXXX")" + local tmpdir; tmpdir="$(mktemp -dt "xbs-abs-release.XXXXXXXXXX")" trap "$(printf 'rm -rf -- %q' "$tmpdir")" EXIT printf '%s\n' \ '#!/bin/bash' \ @@ -126,7 +126,8 @@ unrelease() { local tag="$repo-$arch" load_config - local svndir="${SVNDIR}/$(pac2svn "$repo")/${pkgbase}" + local svndir + svndir="${SVNDIR}/$(pac2svn "$repo")/${pkgbase}" arch_svn up -q "$svndir" # This is based off code from dbscripts:db-remove @@ -140,7 +141,8 @@ move() { local pkgbase=$3 load_config - local svndir="${SVNDIR}/$(pac2svn "$repo")/${pkgbase}" + local svndir + svndir="${SVNDIR}/$(pac2svn "$repo")/${pkgbase}" arch_svn up -q "$svndir" local tag_list="" @@ -181,9 +183,10 @@ releasepath() { local arch=$3 load_config - local svndir="${SVNDIR}/$(pac2svn "$repo")/${pkgbase}" + local svndir releasepath + svndir="${SVNDIR}/$(pac2svn "$repo")/${pkgbase}" arch_svn up -q "${svndir}" - local releasepath="${svndir}/repos/${repo}-${arch}" + releasepath="${svndir}/repos/${repo}-${arch}" if [[ -f "${releasepath}/PKGBUILD" ]]; then printf '%s\n' "$releasepath" return 0 |