-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinstall.sh
More file actions
118 lines (83 loc) · 4.09 KB
/
install.sh
File metadata and controls
118 lines (83 loc) · 4.09 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#!/bin/sh
# /********************************************************************************************************/
# /* PartO : Color of message */
neutre='\e[0;m'
vert='\e[0;32m'
# /********************************************************************************************************/
# /* Part1 : Internet Connection, remove unnecessary applications and installation of important applications */
mkdir /etc/skel/log
# Ensure DNS resolution works inside Cubic's chroot. Cubic ships a
# symlink to systemd-resolved's stub, but the stub isn't running in
# the chroot, so name resolution must be bootstrapped. We only fill
# /etc/resolv.conf when it is missing or empty, and we prefer the
# loopback stub (127.0.0.53) used by systemd-resolved, falling back
# to common public resolvers if it is not available at runtime. This
# avoids silently overriding the host's DNS policy, which is important
# for a device destined for medical/educational environments where
# operators may run their own resolver.
if [ ! -s /etc/resolv.conf ]; then
{
echo "# Generated during ISO build (see install.sh)."
echo "# On first boot, systemd-resolved will manage this file."
echo "nameserver 127.0.0.53"
echo "nameserver 1.1.1.1"
echo "nameserver 9.9.9.9"
} > /etc/resolv.conf
fi
echo "${vert}Internet configuration ... Done${neutre}"
apt-get -y purge firefox 2>>/etc/skel/log/errorAptGet.log 1>>/etc/skel/log/purgeApp.log
echo "${vert}Delete unnecessary file ... Done${neutre}"
echo "deb https://fr.archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb https://security.ubuntu.com/ubuntu/ focal-security main restricted
deb https://archive.ubuntu.com/ubuntu/ focal-updates main restricted
" > /etc/apt/sources.list
apt-get update 2>>/etc/skel/log/errorAptGet.log 1>>/etc/skel/log/installApp.log
apt-get -y install \
build-essential \
curl \
yad \
msmtp msmtp-mta \
bsd-mailx \
grub-efi-amd64-signed \
jq \
2>>/etc/skel/log/errorAptGet.log 1>>/etc/skel/log/installApp.log
echo "${vert}Install necessary file ... Done${neutre}"
# /********************************************************************************************************/
# /* Part2 : Download main installation files */
LATEST_RELEASE_INFO=$(curl -fsSL https://api.github.com/repos/AFSR/InterAACtionBox/releases/latest)
NEW_VERSION_LINK=$(echo "$LATEST_RELEASE_INFO" | jq -r '.assets[] | select(.name | test("InterAACtionBox-main")) | .browser_download_url' | head -n 1)
NEW_VERSION=$(basename "$NEW_VERSION_LINK")
NEW_VERSION_NAME=$(echo "$LATEST_RELEASE_INFO" | jq -r '.name')
cd ~/ || exit
echo "Download of ${NEW_VERSION_NAME}"
wget "$NEW_VERSION_LINK"
tar -zxf "${NEW_VERSION}" >>/etc/skel/log/tarInterAACtionBox.log
rm -r "${NEW_VERSION}"
echo "${vert}Download files of InterAACtionBox ... Done${neutre}"
# /********************************************************************************************************/
# /* Part3 : deb Libs installation */
cd ~/Libs/
apt-get -y install ./*.deb 2>>errorAptGet.log 1>>/etc/skel/log/installDeb.log
cd ~/ISOScripts/
dos2unix ./* 2>>/etc/skel/log/dos2unix.log
cd ~/Scripts/
dos2unix ./* 2>>/etc/skel/log/dos2unix.log
cd ~/Ressources/Launcher/
dos2unix ./* 2>>/etc/skel/log/dos2unix.log
cd ~/Ressources/splashScreenBox/
dos2unix install 2>>/etc/skel/log/dos2unix.log
chmod +x install
echo "${vert}Install necessary file ... Done${neutre}"
# /********************************************************************************************************/
# /* Part4 : Google Chrome CORS installation */
apt-get -y install google-chrome-stable 2>>errorAptGet.log 1>>/etc/skel/log/installApp.log
sh ~/ISOScripts/corsInstall.sh
cd /etc/skel/
mkdir .config
cp -R ~/Ressources/google-chrome /etc/skel/.config
# sed -i '/^Exec=/s/$/ --password-store=basic %U/' /usr/share/applications/google-chrome.desktop
echo "${vert}Install & Configure Google Chrome ... Done${neutre}"
# /********************************************************************************************************/
# /* Part5 : run main installation */
sh ~/ISOScripts/interAACtionBoxInstall.sh
echo "${vert}Install of InterAACtionBox sucessful !${neutre}"