summaryrefslogtreecommitdiffstats
path: root/scripts/makepkg.sh.in
diff options
context:
space:
mode:
authorlolilolicon <lolilolicon@gmail.com>2011-09-30 15:32:49 +0800
committerDan McGee <dan@archlinux.org>2011-09-30 10:57:44 -0500
commitb0543440caad87f1f660eefd6ec5f1a07c7763a0 (patch)
tree13f8b93bd8c394b9c0b8e383eee51ecdbabfbbb9 /scripts/makepkg.sh.in
parent39b0ac43fcbe35897f616a8e202ae9f3bcb1ee5c (diff)
downloadpacman-b0543440caad87f1f660eefd6ec5f1a07c7763a0.tar.xz
makepkg: support .tar.Z source packages creation
SRCEXT should allow whatever PKGEXT does. Also address an uninitialized use of $ret. Signed-off-by: lolilolicon <lolilolicon@gmail.com>
Diffstat (limited to 'scripts/makepkg.sh.in')
-rw-r--r--scripts/makepkg.sh.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index cc06baaf..30658b57 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1337,6 +1337,7 @@ create_signature() {
}
create_srcpackage() {
+ local ret=0
msg "$(gettext "Creating source package...")"
local srclinks="$(mktemp -d "$startdir"/srclinks.XXXXXXXXX)"
mkdir "${srclinks}"/${pkgbase}
@@ -1374,6 +1375,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" ;;
@@ -1390,7 +1392,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=$?