mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
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>
This commit is contained in:
parent
39b0ac43fc
commit
b0543440ca
@ -1337,6 +1337,7 @@ create_signature() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
create_srcpackage() {
|
create_srcpackage() {
|
||||||
|
local ret=0
|
||||||
msg "$(gettext "Creating source package...")"
|
msg "$(gettext "Creating source package...")"
|
||||||
local srclinks="$(mktemp -d "$startdir"/srclinks.XXXXXXXXX)"
|
local srclinks="$(mktemp -d "$startdir"/srclinks.XXXXXXXXX)"
|
||||||
mkdir "${srclinks}"/${pkgbase}
|
mkdir "${srclinks}"/${pkgbase}
|
||||||
@ -1374,6 +1375,7 @@ create_srcpackage() {
|
|||||||
*tar.gz) TAR_OPT="z" ;;
|
*tar.gz) TAR_OPT="z" ;;
|
||||||
*tar.bz2) TAR_OPT="j" ;;
|
*tar.bz2) TAR_OPT="j" ;;
|
||||||
*tar.xz) TAR_OPT="J" ;;
|
*tar.xz) TAR_OPT="J" ;;
|
||||||
|
*tar.Z) TAR_OPT="Z" ;;
|
||||||
*tar) TAR_OPT="" ;;
|
*tar) TAR_OPT="" ;;
|
||||||
*) warning "$(gettext "'%s' is not a valid archive extension.")" \
|
*) warning "$(gettext "'%s' is not a valid archive extension.")" \
|
||||||
"$SRCEXT" ;;
|
"$SRCEXT" ;;
|
||||||
@ -1390,7 +1392,7 @@ create_srcpackage() {
|
|||||||
exit 1 # TODO: error code
|
exit 1 # TODO: error code
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (( ! ret )) && [[ ! "$SRCPKGDEST" -ef "${startdir}" ]]; then
|
if [[ ! "$SRCPKGDEST" -ef "${startdir}" ]]; then
|
||||||
rm -f "${pkg_file/$SRCPKGDEST/$startdir}"
|
rm -f "${pkg_file/$SRCPKGDEST/$startdir}"
|
||||||
ln -s "${pkg_file}" "${pkg_file/$SRCPKGDEST/$startdir}"
|
ln -s "${pkg_file}" "${pkg_file/$SRCPKGDEST/$startdir}"
|
||||||
ret=$?
|
ret=$?
|
||||||
|
Loading…
Reference in New Issue
Block a user