2008-10-03 12:32:26 +00:00
|
|
|
#
|
|
|
|
# This helper is used in templates using extract_sufx=".zip".
|
|
|
|
# This checks if unzip is installed and installs it if it's not
|
2008-10-03 15:19:37 +00:00
|
|
|
# and sets the unzip_cmd/extract_cmd variables appropiately.
|
2008-10-03 12:32:26 +00:00
|
|
|
#
|
2008-10-02 22:44:43 +00:00
|
|
|
unzip_version="5.52"
|
|
|
|
|
2008-10-03 12:32:26 +00:00
|
|
|
# Save pkgname before installing unzip.
|
|
|
|
save_pkgname=$pkgname
|
|
|
|
|
2008-10-02 22:44:43 +00:00
|
|
|
# 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."
|
2008-10-04 04:29:49 +00:00
|
|
|
install_tmpl unzip
|
2008-10-02 22:44:43 +00:00
|
|
|
#
|
2008-10-03 12:32:26 +00:00
|
|
|
# Continue with previous template that called us.
|
2008-10-02 22:44:43 +00:00
|
|
|
#
|
|
|
|
reset_tmpl_vars
|
2008-10-03 12:32:26 +00:00
|
|
|
run_file $PKGFS_TEMPLATESDIR/$save_pkgname.tmpl
|
|
|
|
check_tmpl_vars $save_pkgname
|
2008-10-02 22:44:43 +00:00
|
|
|
fi
|
|
|
|
|
2008-10-03 12:32:26 +00:00
|
|
|
unset save_pkgname
|
2008-10-02 22:44:43 +00:00
|
|
|
unset unzip_version
|
2008-10-03 15:19:37 +00:00
|
|
|
|
2008-10-02 22:44:43 +00:00
|
|
|
unzip_cmd=$PKGFS_MASTERDIR/bin/unzip
|
2008-10-03 15:19:37 +00:00
|
|
|
extract_cmd="$unzip_cmd -x $dfile -d $PKGFS_BUILDDIR"
|