From 21886c627ff9ea3288e7d9fac5c75634aa8aed6e Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 6 Oct 2008 02:51:34 +0200 Subject: [PATCH] Fix unzip's helper to work with last set of changes. --HG-- extra : convert_revision : 69852888e9293ee0bbbcd8aa380f8dc6a7403e02 --- helper-templates/unzip-extraction.sh | 38 +++++++++++++++------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/helper-templates/unzip-extraction.sh b/helper-templates/unzip-extraction.sh index c7a8b3b22c3..af78b40410b 100755 --- a/helper-templates/unzip-extraction.sh +++ b/helper-templates/unzip-extraction.sh @@ -3,26 +3,28 @@ # This checks if unzip is installed and installs it if it's not # and sets the unzip_cmd/extract_cmd variables appropiately. # -unzip_version="5.52" - -# Save pkgname before installing unzip. -save_pkgname=$pkgname - # If unzip is already installed just return immediately. -check_installed_tmpl unzip-$unzip_version -if [ "$?" -ne 0 ]; then - echo "=> unzip not installed, will install it." - install_tmpl unzip - # - # Continue with previous template that called us. - # - reset_tmpl_vars - run_file $PKGFS_TEMPLATESDIR/$save_pkgname.tmpl - check_tmpl_vars $save_pkgname -fi +if [ ! -x $PKGFS_MASTERDIR/bin/unzip ]; then + unzip_version="5.52" -unset save_pkgname -unset unzip_version + # Save pkgname before installing unzip. + save_pkgname=$pkgname + + check_installed_tmpl unzip $unzip_version + if [ "$?" -ne 0 ]; then + echo "=> unzip not installed, will install it." + install_tmpl unzip + # + # Continue with previous template that called us. + # + reset_tmpl_vars + run_file $PKGFS_TEMPLATESDIR/$save_pkgname.tmpl + check_tmpl_vars $save_pkgname + fi + + unset save_pkgname + unset unzip_version +fi unzip_cmd=$PKGFS_MASTERDIR/bin/unzip extract_cmd="$unzip_cmd -x $dfile -d $PKGFS_BUILDDIR"