pushzshconfig 18.01.2013 18:01
This commit is contained in:
parent
d3b9c17f41
commit
a928036077
|
@ -66,3 +66,30 @@ pushzshconfig()
|
|||
|
||||
}
|
||||
|
||||
update()
|
||||
{
|
||||
#checking for system
|
||||
readonly systems="ubuntu arch"
|
||||
issue="$(cat /etc/issue)"
|
||||
for item in $systems; do
|
||||
echo $issue | grep -i $item
|
||||
if [ $? -eq 0 ]; then
|
||||
system=$item
|
||||
fi
|
||||
done
|
||||
|
||||
case $system in
|
||||
ubuntu)
|
||||
sudo apt-get update && sudo apt-get dist-upgrade
|
||||
;;
|
||||
arch)
|
||||
sudo pacman -Syu
|
||||
;;
|
||||
?)
|
||||
echo "unknown system. could not run update."
|
||||
;;
|
||||
esac
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Reference in New Issue