Lucio Andrés Illanes Albornoz (arab, vxp) 570129
#
Lucio Andrés Illanes Albornoz (arab, vxp) 802215
# set -o errexit -o noglob are assumed.
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
#
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
Lucio Andrés Illanes Albornoz (arab, vxp) f539a4
pkg_install() {
Lucio Andrés Illanes Albornoz (arab, vxp) ec19f0
	ex_rtl_fileop mkdir "${PKG_PREFIX}";
Lucio Andrés Illanes Albornoz (arab, vxp) 79f0aa
	find "${PKG_DESTDIR}"				\
Lucio Andrés Illanes Albornoz (arab, vxp) 79f0aa
		-type d -exec chmod 0700 {} \;;
Lucio Andrés Illanes Albornoz (arab, vxp) 79f0aa
	find "${PKG_DESTDIR}"				\
Lucio Andrés Illanes Albornoz (arab, vxp) 79f0aa
		\( -perm -0400 \) -and			\
Lucio Andrés Illanes Albornoz (arab, vxp) 79f0aa
		\( -not -perm /0100 \)			\
Lucio Andrés Illanes Albornoz (arab, vxp) 79f0aa
		-type f -exec chmod 0600 {} \;;
Lucio Andrés Illanes Albornoz (arab, vxp) 79f0aa
	find "${PKG_DESTDIR}"				\
Lucio Andrés Illanes Albornoz (arab, vxp) 79f0aa
		-perm /0100 -type f -exec chmod 0700 {} \;;
Lucio Andrés Illanes Albornoz (arab, vxp) 19ab70
	tar -C "${PKG_DESTDIR}" -cpf - .		|\
Lucio Andrés Illanes Albornoz (arab, vxp) 71b9ce
		tar -C "${PKG_PREFIX}" --overwrite -xpf -;
Lucio Andrés Illanes Albornoz (arab, vxp) 19ab70
	if [ "${ARG_PACKAGE:-0}" -eq 1 ]; then
Lucio Andrés Illanes Albornoz (arab, vxp) 19ab70
		tar -C "${PKG_DESTDIR}" -cpf - .	|\
Lucio Andrés Illanes Albornoz (arab, vxp) 19ab70
			gzip -c -9 - > "${PKG_BASE_DIR}/${PKG_NAME}.tgz"
Lucio Andrés Illanes Albornoz (arab, vxp) 19ab70
	fi;
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
};
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
Lucio Andrés Illanes Albornoz (arab, vxp) 570129
# vim:filetype=sh