xbps-triggers: [virtualpkg] handle all vpkg files.

This commit is contained in:
Juan RP 2012-07-27 11:52:44 +02:00
parent 32b0f86b14
commit 9b7aa80f24
2 changed files with 5 additions and 12 deletions

View File

@ -25,17 +25,10 @@ run)
[ -z "$CONF_FILE" ] && CONF_FILE=etc/xbps/xbps.conf
[ ! -w $CONF_FILE ] && exit 0
if [ "${TARGET}" = "post-install" ]; then
if [ "$UPDATE" = "yes" ]; then
# do nothing
exit 0
fi
echo "Enabled $PKGNAME virtual packages to $CONF_FILE."
echo "include(/etc/xbps/virtualpkg.d/$PKGNAME.conf)" >> ./$CONF_FILE
else
sed -i "/^include.*${PKGNAME}\.conf.*$/d" ./$CONF_FILE
echo "Disabled $PKGNAME virtual packages from $CONF_FILE."
fi
sed -i "/^include.*\/etc\/xbps\/virtualpkg.d\/.*/d" ./$CONF_FILE
for f in etc/xbps/virtualpkg.d/*.conf; do
echo "include(/$f)" >> ./$CONF_FILE
done
;;
*)
exit 1

View File

@ -1,6 +1,6 @@
# Template file for 'xbps-triggers'
pkgname=xbps-triggers
version=0.43
version=0.44
revision=1
noarch=yes
noextract=yes