On 30/09/11 17:32, lolilolicon wrote:
SRCEXT should allow whatever PKGEXT does. Also address an uninitialized use of $ret.
Signed-off-by: lolilolicon<lolilolicon@gmail.com>
Ack. I moved the initialization of ret to just above the if block it is used in a pushed to my patchqueue branch.
--- scripts/makepkg.sh.in | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 213ac32..ebb62d8 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1331,6 +1331,7 @@ create_signature() { }
create_srcpackage() { + local ret=0 msg "$(gettext "Creating source package...")" local srclinks="$(mktemp -d "$startdir"/srclinks.XXXXXXXXX)" mkdir "${srclinks}"/${pkgbase} @@ -1368,6 +1369,7 @@ create_srcpackage() { *tar.gz) TAR_OPT="z" ;; *tar.bz2) TAR_OPT="j" ;; *tar.xz) TAR_OPT="J" ;; + *tar.Z) TAR_OPT="Z" ;; *tar) TAR_OPT="" ;; *) warning "$(gettext "'%s' is not a valid archive extension.")" \ "$SRCEXT" ;; @@ -1384,7 +1386,7 @@ create_srcpackage() { exit 1 # TODO: error code fi
- if (( ! ret ))&& [[ ! "$SRCPKGDEST" -ef "${startdir}" ]]; then + if [[ ! "$SRCPKGDEST" -ef "${startdir}" ]]; then rm -f "${pkg_file/$SRCPKGDEST/$startdir}" ln -s "${pkg_file}" "${pkg_file/$SRCPKGDEST/$startdir}" ret=$?