vp-build/helper-templates/unzip-extraction.sh
Juan RP 84d4f6391a Change helper-templates files to mode 644.
--HG--
extra : convert_revision : a156c08bb49d2314e667b86feba5a5a3180e39f2
2008-10-13 07:51:55 +02:00

38 lines
923 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#
# This helper is used in templates using extract_sufx=".zip".
# This checks if unzip is installed and installs it if it's not
# and sets the unzip_cmd/extract_cmd variables appropiately.
#
# If unzip is already installed just return immediately.
if [ ! -x "$XBPS_MASTERDIR/bin/unzip" ]; then
unzip_version="5.52"
# Save pkgname before installing unzip.
save_pkgname=$pkgname
check_installed_pkg unzip $unzip_version
if [ $? -ne 0 ]; then
echo "=> \`\`$pkg´´ package requires unzip for extraction."
#
# Install dependencies required by unzip.
#
install_builddeps_required_pkg unzip-$unzip_version
#
# Install the unzip package now.
#
install_pkg unzip
#
# Continue with previous template that called us.
#
reset_tmpl_vars
setup_tmpl $save_pkgname
fi
unset save_pkgname
unset unzip_version
fi
unzip_cmd=$XBPS_MASTERDIR/bin/unzip
extract_cmd="$unzip_cmd -x $dfile -d $XBPS_BUILDDIR"