blob: df98a39fede97e810e22dc58cfe708ea7913b660 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# vi: ft=sh
shopt -s expand_aliases
alias sudo="sudo "
PKGMAN="/bin/false"
[ -f "/etc/os-release" ] && source /etc/os-release
[ ! -z $ID_LIKE ] && ID=$ID_LIKE
case $ID in
arch)
PKGMAN="pacman"
INSTALL_CMD="--noconfirm -S"
REMOVE_CMD="--noconfirm -Rs"
UPDATE_CMD="--noconfirm -Sy"
UPGRADE_CMD="--noconfirm -Syu"
FULLUPGRADE_CMD="--noconfirm -Syu"
;;
debian)
PKGMAN="DEBIAN_FRONTEND=noninteractive apt-get"
INSTALL_CMD="install -y"
REMOVE_CMD="purge -y"
UPDATE_CMD="update"
UPGRADE_CMD="upgrade -y"
FULLUPGRADE_CMD="dist-upgrade"
;;
*)
1>&2 echo Distribution could not be determined
exit 1
esac
alias pkg_install="$PKGMAN $INSTALL_CMD"
alias pkg_remove="$PKGMAN $REMOVE_CMD"
alias pkg_update="$PKGMAN $UPDATE_CMD"
alias pkg_upgrade="$PKGMAN $UPGRADE_CMD"
alias pkg_fullupgrade="$PKGMAN $FULLUPGRADE_CMD"
|