From 62fc966882aab2807c515614332ea74f848a5cf3 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 9 Feb 2011 07:54:42 -0600 Subject: Ensure pkgbase/epoch are defined before doing anything When generating integrity sums, we could get some weird output before due to epoch being uninitialized: /usr/bin/makepkg: line 234: [[: 2.6.37: syntax error: invalid arithmetic operator (error token is ".6.37") Signed-off-by: Dan McGee --- scripts/makepkg.sh.in | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 001178ad..16dc0b8f 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1850,6 +1850,10 @@ else source "$BUILDFILE" fi +# set defaults if they weren't specified in buildfile +pkgbase=${pkgbase:-${pkgname[0]}} +epoch=${epoch:-0} + if (( GENINTEG )); then mkdir -p "$srcdir" chmod a-s "$srcdir" @@ -1859,9 +1863,6 @@ if (( GENINTEG )); then exit 0 # $E_OK fi -pkgbase=${pkgbase:-${pkgname[0]}} -epoch=${epoch:-0} - # check the PKGBUILD for some basic requirements check_sanity || exit 1 -- cgit v1.2.3-24-g4f1b