##// END OF EJS Templates
0
Unknown -
r320:70398fb352c4
parent child
Show More
@@ -1,53 +1,58
1 1 #!/bin/bash
2 2 #
3 3 # Setup APT repositories
4 4 #
5 5
6 6 # Load utility functions
7 7 . ./functions.sh
8 8
9 9 # Install and setup APT proxy configuration
10 10 if [ -z "$APT_PROXY" ] ; then
11 11 install_readonly files/apt/10proxy "${ETC_DIR}/apt/apt.conf.d/10proxy"
12 12 sed -i "s/\"\"/\"${APT_PROXY}\"/" "${ETC_DIR}/apt/apt.conf.d/10proxy"
13 13 fi
14 14
15 15 if [ "$BUILD_KERNEL" = false ] ; then
16 16 echo "Downloading precompiled kernel"
17 17 echo "error: not configured"
18 18 exit 1;
19 19 # BUILD_KERNEL=true
20 20 else
21 21 echo "No precompiled kernel repositories were added"
22 22 fi
23 23
24 24 #autconfigure best apt server to not spam ftp.debian.org
25 25 #rm files/apt/sources.list
26 26 #netselect-apt does not know buster yet
27 27 if [ "$RELEASE" = "buster" ] ; then
28 28 RELEASE=${RELEASE:=testing}
29 29 fi
30 30
31 31 if [ "$ENABLE_NONFREE" = true ] ; then
32 netselect-apt --arch "$RELEASE_ARCH" --sources --nonfree --outfile "${ETC_DIR}/apt/sources.list" -d "$RELEASE"
32 netselect-apt --arch "$RELEASE_ARCH" --tests 10 --sources --nonfree --outfile "${ETC_DIR}/apt/sources.list" -d "$RELEASE"
33 33 else
34 netselect-apt --arch "$RELEASE_ARCH" --sources --outfile "${ETC_DIR}/apt/sources.list" -d "$RELEASE"
34 netselect-apt --arch "$RELEASE_ARCH" --tests 10 --sources --outfile "${ETC_DIR}/apt/sources.list" -d "$RELEASE"
35 35 fi
36 36
37 #ipinfo=$(curl ipinfo.io | grep country )
38 #grep -o '\"[^"]*\"' $ipinfo | tr -d '"'
39 #grep -Po '"country":.*?[^\\]",' $(curl ipinfo.io | grep country )
40 #sed -i "s,http:,https:,g" "${ETC_DIR}/apt/sources.list"
41
37 42 # Upgrade package index and update all installed packages and changed dependencies
38 43 chroot_exec apt-get -qq -y update
39 44 chroot_exec apt-get -qq -y -u dist-upgrade
40 45
41 46 if [ "$APT_INCLUDES_LATE" ] ; then
42 47 chroot_exec apt-get -qq -y install "$(echo "$APT_INCLUDES_LATE" |tr , ' ')"
43 48 fi
44 49
45 50 if [ -d packages ] ; then
46 51 for package in packages/*.deb ; do
47 52 cp "$package" "${R}"/tmp
48 53 chroot_exec dpkg --unpack /tmp/"$(basename "$package")"
49 54 done
50 55 fi
51 56 chroot_exec apt-get -qq -y -f install
52 57
53 58 chroot_exec apt-get -qq -y check No newline at end of file
General Comments 0
Vous devez vous connecter pour laisser un commentaire. Se connecter maintenant