xbps-triggers: virtualpkg: better regexp, do nothing in update case.
This commit is contained in:
parent
2f1019234e
commit
b93f2d45cd
2 changed files with 8 additions and 4 deletions
|
@ -25,11 +25,15 @@ run)
|
|||
[ -z "$CONF_FILE" ] && CONF_FILE=etc/xbps/xbps.conf
|
||||
[ ! -w $CONF_FILE ] && exit 0
|
||||
|
||||
if [ "${TARGET}" = "post-install" -a "$UPDATE" = "no" ]; then
|
||||
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
|
||||
echo "include(/etc/xbps/virtualpkg.d/$PKGNAME.conf)" >> ./$CONF_FILE
|
||||
else
|
||||
sed -i "/include.*$PKGNAME.conf.*/d" $CONF_FILE
|
||||
sed -i "/^include.*${PKGNAME}\.conf.*$/d" ./$CONF_FILE
|
||||
echo "Disabled $PKGNAME virtual packages from $CONF_FILE."
|
||||
fi
|
||||
;;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Template file for 'xbps-triggers'
|
||||
pkgname=xbps-triggers
|
||||
version=0.36
|
||||
version=0.37
|
||||
short_desc="XBPS triggers"
|
||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||
homepage="http://code.google.com/p/xbps"
|
||||
|
|
Loading…
Reference in a new issue