update pk
git-svn-id: http://photonzero.com/dotfiles/trunk@113 23f722f6-122a-0410-8cef-c75bd312dd78
This commit is contained in:
parent
f0e315902b
commit
02ad0c26b7
1 changed files with 8 additions and 8 deletions
16
bin/pk
16
bin/pk
|
|
@ -18,26 +18,26 @@ search () {
|
||||||
update () {
|
update () {
|
||||||
shift
|
shift
|
||||||
if which pacman >/dev/null; then
|
if which pacman >/dev/null; then
|
||||||
pacman -Sy
|
sudo pacman -Sy
|
||||||
elif which port >/dev/null; then
|
elif which port >/dev/null; then
|
||||||
port selfupdate
|
sudo port selfupdate
|
||||||
elif which portmaster >/dev/null; then
|
elif which portmaster >/dev/null; then
|
||||||
portsnap fetch && portsnap upgrade
|
sudo portsnap fetch && sudo portsnap upgrade
|
||||||
elif which apt-get >/dev/null; then
|
elif which apt-get >/dev/null; then
|
||||||
apt-get update
|
sudo apt-get update
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
install () {
|
install () {
|
||||||
shift
|
shift
|
||||||
if which pacman >/dev/null; then
|
if which pacman >/dev/null; then
|
||||||
pacman -S $* || aurget -Ss --asroot $*
|
sudo pacman -S $* || sudo aurget -Ss --asroot $*
|
||||||
elif which port >/dev/null; then
|
elif which port >/dev/null; then
|
||||||
port install $*
|
sudo port install $*
|
||||||
elif which portmaster >/dev/null; then
|
elif which portmaster >/dev/null; then
|
||||||
portmaster $*
|
sudo portmaster $*
|
||||||
elif which apt-get >/dev/null; then
|
elif which apt-get >/dev/null; then
|
||||||
apt-get install $*
|
sudo apt-get install $*
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue