- #!/bin/bash
- #
- # This script will unmask any package masked by the actual profile.
- #
- # First we search for what is actually masked
- # in /usr/portage/profiles/package.mask then add a corresponding
- # line in /etc/portage/package.unmask
- #
- #
- # Original by [email protected]
- source /sbin/functions.sh
- [ "$UID" -ne "0" ] && eerror "You must be root to run this script." && exit
- [ -z "$1" ] && eerror "Please state a package name (eg. unmask kde-base/kode)" && exit
- [ ! -d /etc/portage ] && einfo "Creating /etc/portage directory" && mkdir /etc/portage
- if [ "$(grep "$1"-[0-9] /etc/portage/package.unmask 2>/dev/null)" ]; then
- ewarn "$1 already exists in package.unmask"
- else
- PKG_LINE="$(grep "$1"-[0-9] /usr/portage/profiles/package.mask 2>/dev/null)"
- if [ ! $PKG_LINE ]; then
- PKG_LINE="$(grep "$1" /usr/portage/profiles/package.mask 2>/dev/null)"
- fi
- if [ ! $PKG_LINE ]; then
- ewarn "Could not find $1 in /usr/portage/profiles/package.mask" && exit 1
- else
- ebegin "Adding $1 to package.unmask"
- echo $PKG_LINE >> /etc/portage/package.unmask
- eend $?
- fi
- fi
Posted by Anonymous on Thu 17th May 21:57
download | new post
Submit a correction or amendment below. (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.