-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathinstall.sh
executable file
·66 lines (54 loc) · 2.33 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
64
65
66
#!/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/fenrirscreenreader
cp -af src/* /opt/fenrirscreenreader
ln -fs /opt/fenrirscreenreader/fenrir-daemon /usr/bin/fenrir-daemon
ln -fs /opt/fenrirscreenreader/fenrir /usr/bin/fenrir
# tools
install -m755 -d /usr/share/fenrirscreenreader/tools
cp -af tools/* /usr/share/fenrirscreenreader/tools
# scripts
install -m755 -d /usr/share/fenrirscreenreader/scripts
cp -af "config/scripts/wlan__-__key_y.sh" /usr/share/fenrirscreenreader/scripts/
# keyboard
for i in "config/keyboard/"*.conf ; do
install -m644 -D "$i" "/etc/fenrirscreenreader/keyboard/${i##*/}"
done
# punctuation
install -m755 -d /etc/fenrirscreenreader/punctuation
cp -af config/punctuation/* /etc/fenrirscreenreader/punctuation
# sound
install -d /usr/share/sounds/fenrirscreenreader
cp -af config/sound/default /usr/share/sounds/fenrirscreenreader/default
cp -af config/sound/template /usr/share/sounds/fenrirscreenreader/template
# config
if [ -f "/etc/fenrirscreenreader/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/fenrirscreenreader/settings/settings.conf /etc/fenrirscreenreader/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/fenrirscreenreader/settings/settings.conf
else
install -m644 -D "config/settings/settings.conf" /etc/fenrirscreenreader/settings/settings.conf.current
fi
else
install -m644 -D "config/settings/settings.conf" /etc/fenrirscreenreader/settings/settings.conf
fi
# end message
cat << EOF
Installation complete.
install path:/opt/fenrirscreenreader
settings path:/etc/fenrirscreenreader
To test Fenrir:
sudo fenrir
To have Fenrir start on system boot using systemd:
download service file: https://raw.githubusercontent.com/chrys87/fenrir/master/autostart/systemd/Arch/fenrir.service
move the service file to: /etc/systemd/system/fenrir.service
sudo systemctl enable fenrir
Pulseaudio users may want to run
/usr/share/fenrirscreenreader/tools/configure_pulse.sh
once from their user account, then once from the root.
EOF