mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-10 11:35:00 -05:00
makepkg: Move .PKGINFO creation into a function.
Signed-off-by: Loui Chang <louipc.ist@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
02acf65ef3
commit
01f9ae63e7
@ -871,22 +871,7 @@ tidy_install() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
create_package() {
|
write_pkginfo() {
|
||||||
if [ -z "$1" ]; then
|
|
||||||
nameofpkg="$pkgname"
|
|
||||||
else
|
|
||||||
nameofpkg="$1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -d "$pkgdir" ]; then
|
|
||||||
error "$(gettext "Missing pkg/ directory.")"
|
|
||||||
plain "$(gettext "Aborting...")"
|
|
||||||
exit 1 # $E_MISSING_PKGDIR
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd "$pkgdir"
|
|
||||||
msg "$(gettext "Creating package...")"
|
|
||||||
|
|
||||||
local builddate=$(date -u "+%s")
|
local builddate=$(date -u "+%s")
|
||||||
if [ -n "$PACKAGER" ]; then
|
if [ -n "$PACKAGER" ]; then
|
||||||
local packager="$PACKAGER"
|
local packager="$PACKAGER"
|
||||||
@ -958,6 +943,25 @@ create_package() {
|
|||||||
warning "$(gettext "Please add a license line to your %s!")" "$BUILDSCRIPT"
|
warning "$(gettext "Please add a license line to your %s!")" "$BUILDSCRIPT"
|
||||||
plain "$(gettext "Example for GPL\'ed software: license=('GPL').")"
|
plain "$(gettext "Example for GPL\'ed software: license=('GPL').")"
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
create_package() {
|
||||||
|
if [ ! -d "$pkgdir" ]; then
|
||||||
|
error "$(gettext "Missing pkg/ directory.")"
|
||||||
|
plain "$(gettext "Aborting...")"
|
||||||
|
exit 1 # $E_MISSING_PKGDIR
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
nameofpkg="$pkgname"
|
||||||
|
else
|
||||||
|
nameofpkg="$1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
write_pkginfo $nameofpkg
|
||||||
|
|
||||||
|
cd "$pkgdir"
|
||||||
|
msg "$(gettext "Creating package...")"
|
||||||
|
|
||||||
local comp_files=".PKGINFO"
|
local comp_files=".PKGINFO"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user