Add FreeBSD support to upgrade().
This commit is contained in:
parent
8443e012b6
commit
d136009bd3
@ -63,13 +63,22 @@ function ud() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function upgrade() {
|
function upgrade() {
|
||||||
if [ $(uname -s) != "Darwin" ]; then
|
if [ $(uname -s) = "Darwin" ]; then
|
||||||
|
brew update && brew upgrade && brew cleanup
|
||||||
|
rm -rf ~/Library/Caches/Homebrew/*
|
||||||
|
elif [ $(uname -s) = "FreeBSD" ]; then
|
||||||
|
pkg update -f
|
||||||
|
pkg upgrade
|
||||||
|
git -C /usr/ports pull
|
||||||
|
portmaster -a
|
||||||
|
freebsd-update fetch
|
||||||
|
freebsd-update install
|
||||||
|
rm -rf /var/cache/pkg/* /usr/ports/distfiles/*
|
||||||
|
pkg audit -F
|
||||||
|
else
|
||||||
case $(lsb_release -si) in
|
case $(lsb_release -si) in
|
||||||
Gentoo) eix-sync && eix-update && emerge -avuNDU @world ;;
|
Gentoo) eix-sync && eix-update && emerge -avuNDU @world ;;
|
||||||
VoidLinux) xbps-install -Su && xbps-remove -RoO && xlocate -S && du -sh /var/cache/xbps && rm -rf /var/cache/xbps/* ;;
|
VoidLinux) xbps-install -Su && xbps-remove -RoO && xlocate -S && du -sh /var/cache/xbps && rm -rf /var/cache/xbps/* ;;
|
||||||
esac
|
esac
|
||||||
else
|
|
||||||
brew update && brew upgrade && brew cleanup
|
|
||||||
rm -rf ~/Library/Caches/Homebrew/*
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user