12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- #!/bin/sh
- updatey() {
- if test $# = 0
- then
- apt-get -y update && apt-get -y upgrade
- else
- apt-get -y install $1
- fi
- }
- yes() {
- if test "$1" = "install"
- then
- apt-get -y install $2
- elif test "$1" = "upgrade"
- then
- updatey $2
- elif test "$1" = "remove"
- then
- apt-get -y purge $2
- else
- echo E: Invalid operation $1
- fi
- }
- update() {
- if test $# = 0
- then
- apt-get update && apt-get upgrade
- else
- apt-get install $1
- fi
- }
- if test "$1" = "install"
- then
- apt-get install $2
- elif test "$1" = "autoremove"
- then
- apt-get autoremove
- elif test "$1" = "upgrade"
- then
- update $2
- elif test "$1" = "info"
- then
- apt-cache show $2
- elif test "$1" = "-y"
- then
- updatey $2 $3
- elif test "$1" = "remove"
- then
- apt-get purge $2
- else
- echo E: Invalid operation $1
- fi
|