forked from Antergos/fenrir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·63 lines (52 loc) · 2.04 KB
/
install.sh
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
#!/bin/bash
#Basic install script for Fenrir.
read -p "This will install Fenrir. Press ctrl+c to cancel, or enter to continue." continue
# fenrir main application
install -m755 -d /opt/fenrir
cp -a src/fenrir/* /opt/fenrir
install -m644 -D "autostart/systemd/fenrir.service" /usr/lib/systemd/system/fenrir.service
ln -s /opt/fenrir/fenrir-daemon /usr/bin/fenrir
# tools
install -m755 -d /usr/share/fenrir/tools
cp -a tools/* /usr/share/fenrir/tools
# scripts
install -m755 -d /usr/share/fenrir/scripts
cp -a "config/scripts/wlan__-__key_y.sh" /usr/share/fenrir/scripts/
# keyboard
install -m644 -D "config/keyboard/desktop.conf" /etc/fenrir/keyboard/desktop.conf
install -m644 -D "config/keyboard/laptop.conf" /etc/fenrir/keyboard/laptop.conf
# punctuation
install -m755 -d /etc/fenrir/punctuation
cp -a config/punctuation/* /etc/fenrir/punctuation
# sound
install -d /usr/share/sounds/fenrir
cp -a config/sound/default /usr/share/sounds/fenrir/default
cp -a config/sound/default-wav /usr/share/sounds/fenrir/default-wav
cp -a config/sound/template /usr/share/sounds/fenrir/template
# config
if [ -f "/etc/fenrir/settings/settings.conf" ]; then
echo "Do you want to overwrite your current global settings? (y/n)"
read yn
if [ $yn = "Y" -o $yn = "y" ]; then
mv /etc/fenrir/settings/settings.conf /etc/fenrir/settings/settings.conf.bak
echo "Your old settings.conf has been backed up to settings.conf.bak."
install -m644 -D "config/settings/settings.conf" /etc/fenrir/settings/settings.conf
else
install -m644 -D "config/settings/settings.conf" /etc/fenrir/settings/settings.conf.current
fi
else
install -m644 -D "config/settings/settings.conf" /etc/fenrir/settings/settings.conf
fi
# end message
cat << EOF
Installation complete.
install path:/opt/fenrir
settings path:/etc/fenrir
To test Fenrir
sudo systemctl start fenrir
To have Fenrir start on system boot:
sudo systemctl enable fenrir
Pulseaudio users may want to run
/usr/share/fenrir/tools/configure-pulseaudio
once as their user account, then once as root.
EOF