From 355930654693b416725e170ad0cb14d0251626e4 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 17 Feb 2008 21:15:06 -0600 Subject: scripts: allow usage when gettext is not installed Address the issue of our scripts not working so great when gettext is not available. This has come up in multiple bug reports, and is relatively easy to address by adding a simple check and a stub function if gettext was not found that simply echos the original message. Addresses concerns from FS#9214 and FS#9607. Signed-off-by: Dan McGee --- scripts/makepkg.sh.in | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'scripts/makepkg.sh.in') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 090ba5df..ed4794f0 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1107,6 +1107,15 @@ This is free software; see the source for copying conditions.\n\ There is NO WARRANTY, to the extent permitted by law.\n")" } +# PROGRAM START + +# determine whether we have gettext; make it a no-op if we do not +if [ ! $(type -t gettext) ]; then + gettext() { + echo "$@" + } +fi + ARGLIST=$@ #preserve environment variables -- cgit v1.2.3-70-g09d2 From 420c8846b984b5ca8ddd27ff7b799ec77fbbc2a4 Mon Sep 17 00:00:00 2001 From: Mark Constable Date: Wed, 20 Feb 2008 15:08:31 +0100 Subject: Fix two missing BUILDSCRIPT variables in makepkg. Signed-off-by: Chantry Xavier --- scripts/makepkg.sh.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/makepkg.sh.in') diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index ed4794f0..598e6879 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -939,8 +939,8 @@ create_xdelta() { create_srcpackage() { cd "$startdir" msg "$(gettext "Creating source package...")" - local comp_files="PKGBUILD" - msg2 "$(gettext "Adding %s...")" "PKGBUILD" + local comp_files="$BUILDSCRIPT" + msg2 "$(gettext "Adding %s...")" "$BUILDSCRIPT" if [ "$install" != "" ]; then if [ -f $install ]; then -- cgit v1.2.3-70-g09d2