Added em function

This commit is contained in:
Austen Adler 2016-03-13 22:05:07 -04:00
parent b5313b58de
commit ce60a18c47

View File

@ -110,7 +110,24 @@ if test -f /etc/gentoo-release; then
# Gentoo
ins(){
echo "args: $*"
sudo zsh -c "emerge --autounmask-write -Aav $*"
# Beep, verbose, ask
sudo zsh -c "emerge --autounmask-write -Ava $*"
echo "\a"
}
# For emerging with absolute paths
em(){
# Beep, verbose, ask
EMERGE_ARGS="-Ava"
X=""
for var in "$@"
do
if [[ "$var" =~ ^- ]]; then
EMERGE_ARGS="$EMERGE_ARGS $var"
else
X="$X =$var"
fi
done
sudo emerge $EMERGE_ARGS$X
echo "\a"
}
update(){