-
Notifications
You must be signed in to change notification settings - Fork 8
/
pbp-config-apt
executable file
·74 lines (63 loc) · 1.89 KB
/
pbp-config-apt
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/sh
### Package: pbp-config-apt
### Version: v20200725.2300
### Author: Michael Gan "xmixahlx" [email protected]
### License: GPLv3
### Script Dependencies: linux
## PBPTOOLSDIR
if [ -z $PBPTOOLSDIR ]; then
PBPTOOLSDIR="`pwd`"
fi
## VARS
DATE=`date +%Y%m%d%H%M%S`
RESDIR=$PBPTOOLSDIR/resources
## OVERRIDES
# Override debian.
if [ -z $INSTALLDEPS ]; then
INSTALLDEPS=debian
fi
echo "\n*** INSTALLDEPS selected is $INSTALLDEPS.\n"
## DEBIAN OPTIONS LOOP
if [ $INSTALLDEPS = debian ]; then
# Provide buster, bullseye, or sid.
if [ $DEBRELEASE ]; then
if [ $DEBRELEASE = buster ]; then
echo "\n*** DEBRELEASE selected is buster.\n"
elif [ $DEBRELEASE = bullseye ]; then
echo "\n*** DEBRELEASE selected is bullseye.\n"
elif [ $DEBRELEASE = sid ]; then
echo "\n*** DEBRELEASE selected is sid.\n"
else
echo "\n*** DEBRELEASE must be passed on commandline as buster, bullseye, or sid.\n"
exit
fi
fi
if [ -z $DEBRELEASE ]; then
echo "\n*** DEBRELEASE must be passed on commandline as buster, bullseye, or sid.\n"
exit
fi
# Override yes with no to NOT use deb-multimedia.org packages.
if [ -z $DEBMULTIMEDIA ]; then
DEBMULTIMEDIA=yes
fi
echo "\n*** DEBMULTIMEDIA selected is $DEBMULTIMEDIA.\n"
fi
## DEBIAN CONFIG
if [ $INSTALLDEPS = debian ]; then
## APTCONFIG
sudo install -Dm644 $RESDIR/apt/preferences.$DEBRELEASE /etc/apt/preferences
sudo install -Dm644 $RESDIR/apt/sources.list.$DEBRELEASE /etc/apt/sources.list
## DEBIAN MULTIMEDIA
if [ $DEBMULTIMEDIA = yes ]; then
sudo mkdir -p /etc/apt/sources.list.d/
sudo install -Dm644 $RESDIR/apt/deb-multimedia-$DEBRELEASE.list /etc/apt/sources.list.d/deb-multimedia-$DEBRELEASE.list
sudo apt-get -y update -oAcquire::AllowInsecureRepositories=true
sudo apt-get -y install deb-multimedia-keyring --allow-unauthenticated
fi
## APT DIST-UPGRADE
sudo apt-get -y update
sudo apt-get -y dist-upgrade
fi
## EXIT
exit
## ENJOY