mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-22 15:58:50 -05:00
Additional path quoting and srcdir/pkgdir usage
Removes the remaining $startdir/{src,pkg} usage and adds quoting around (hopefully) all remaining path variables Signed-off-by: Allan McRae <mcrae_allan@hotmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
7edb2e5b0d
commit
74eb2f5c61
@ -148,8 +148,7 @@ clean_up() {
|
|||||||
if [ $EXIT_CODE -eq 0 -a "$CLEANUP" = "1" ]; then
|
if [ $EXIT_CODE -eq 0 -a "$CLEANUP" = "1" ]; then
|
||||||
# If it's a clean exit and -c/--clean has been passed...
|
# If it's a clean exit and -c/--clean has been passed...
|
||||||
msg "$(gettext "Cleaning up...")"
|
msg "$(gettext "Cleaning up...")"
|
||||||
cd "$startdir"
|
rm -rf "$pkgdir" "$srcdir"
|
||||||
rm -rf pkg src
|
|
||||||
if [ "$pkgname" != "" ]; then
|
if [ "$pkgname" != "" ]; then
|
||||||
# Can't do this unless the BUILDSCRIPT has been sourced.
|
# Can't do this unless the BUILDSCRIPT has been sourced.
|
||||||
rm -f "${pkgname}-${pkgver}-${pkgrel}-${CARCH}.log*"
|
rm -f "${pkgname}-${pkgver}-${pkgrel}-${CARCH}.log*"
|
||||||
@ -510,7 +509,7 @@ generate_checksums() {
|
|||||||
plain "$(gettext "Aborting...")"
|
plain "$(gettext "Aborting...")"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
file=$SRCDEST/$file
|
file="$SRCDEST/$file"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -557,7 +556,7 @@ check_checksums() {
|
|||||||
errors=1
|
errors=1
|
||||||
continue
|
continue
|
||||||
else
|
else
|
||||||
file=$SRCDEST/$file
|
file="$SRCDEST/$file"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -598,7 +597,7 @@ extract_sources() {
|
|||||||
plain "$(gettext "Aborting...")"
|
plain "$(gettext "Aborting...")"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
file=$SRCDEST/$file
|
file="$SRCDEST/$file"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -960,7 +959,7 @@ create_srcpackage() {
|
|||||||
local file=$(strip_url "$netfile")
|
local file=$(strip_url "$netfile")
|
||||||
if [ -f "$netfile" ]; then
|
if [ -f "$netfile" ]; then
|
||||||
msg2 "$(gettext "Adding %s...")" "$netfile"
|
msg2 "$(gettext "Adding %s...")" "$netfile"
|
||||||
ln -s $netfile ${srclinks}/${pkgname}
|
ln -s $netfile "${srclinks}/${pkgname}"
|
||||||
elif [ "$SOURCEONLY" = "2" -a -f "$SRCDEST/$file" ]; then
|
elif [ "$SOURCEONLY" = "2" -a -f "$SRCDEST/$file" ]; then
|
||||||
msg2 "$(gettext "Adding %s...")" "$file"
|
msg2 "$(gettext "Adding %s...")" "$file"
|
||||||
ln -s "$SRCDEST/$file" "${srclinks}/${pkgname}/"
|
ln -s "$SRCDEST/$file" "${srclinks}/${pkgname}/"
|
||||||
@ -971,13 +970,13 @@ create_srcpackage() {
|
|||||||
|
|
||||||
# tar it up
|
# tar it up
|
||||||
msg2 "$(gettext "Compressing source package...")"
|
msg2 "$(gettext "Compressing source package...")"
|
||||||
cd ${srclinks}
|
cd "${srclinks}"
|
||||||
if ! bsdtar -czLf "$pkg_file" ${pkgname}; then
|
if ! bsdtar -czLf "$pkg_file" ${pkgname}; then
|
||||||
error "$(gettext "Failed to create source package file.")"
|
error "$(gettext "Failed to create source package file.")"
|
||||||
exit 1 # TODO: error code
|
exit 1 # TODO: error code
|
||||||
fi
|
fi
|
||||||
cd ${startdir}
|
cd "${startdir}"
|
||||||
rm -rf ${srclinks}
|
rm -rf "${srclinks}"
|
||||||
}
|
}
|
||||||
|
|
||||||
install_package() {
|
install_package() {
|
||||||
|
Loading…
Reference in New Issue
Block a user