2016-10-22 16:53:24 -04:00
|
|
|
#!/bin/bash
|
2017-02-19 20:27:26 -05:00
|
|
|
#Basic install script for Fenrir.
|
2017-08-12 06:38:03 -04:00
|
|
|
read -p "This will install Fenrir. Press ctrl+C to cancel, or enter to continue." continue
|
2017-02-17 03:48:17 -05:00
|
|
|
|
2017-08-12 06:38:03 -04:00
|
|
|
# Fenrir main application
|
2018-03-21 06:10:12 -04:00
|
|
|
install -m755 -d /opt/fenrirscreenreader
|
|
|
|
cp -af src/* /opt/fenrirscreenreader
|
2018-06-17 18:31:50 -04:00
|
|
|
|
2018-03-21 06:10:12 -04:00
|
|
|
ln -fs /opt/fenrirscreenreader/fenrir-daemon /usr/bin/fenrir-daemon
|
|
|
|
ln -fs /opt/fenrirscreenreader/fenrir /usr/bin/fenrir
|
2017-02-17 03:48:17 -05:00
|
|
|
# tools
|
2018-03-21 06:10:12 -04:00
|
|
|
install -m755 -d /usr/share/fenrirscreenreader/tools
|
|
|
|
cp -af tools/* /usr/share/fenrirscreenreader/tools
|
2017-02-17 03:48:17 -05:00
|
|
|
|
|
|
|
# scripts
|
2018-03-21 06:10:12 -04:00
|
|
|
install -m755 -d /usr/share/fenrirscreenreader/scripts
|
|
|
|
cp -af "config/scripts/wlan__-__key_y.sh" /usr/share/fenrirscreenreader/scripts/
|
2017-02-17 03:48:17 -05:00
|
|
|
|
2017-02-17 03:54:33 -05:00
|
|
|
# keyboard
|
2021-02-22 17:51:36 -05:00
|
|
|
for i in "config/keyboard/"*.conf ; do
|
|
|
|
install -m644 -D "$i" "/etc/fenrirscreenreader/keyboard/${i##*/}"
|
|
|
|
done
|
2017-02-17 03:48:17 -05:00
|
|
|
|
2017-02-17 03:54:33 -05:00
|
|
|
# punctuation
|
2018-03-21 06:10:12 -04:00
|
|
|
install -m755 -d /etc/fenrirscreenreader/punctuation
|
|
|
|
cp -af config/punctuation/* /etc/fenrirscreenreader/punctuation
|
2017-02-17 03:48:17 -05:00
|
|
|
|
|
|
|
# sound
|
2018-03-21 06:10:12 -04:00
|
|
|
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
|
2017-02-02 03:55:22 -05:00
|
|
|
|
2017-02-17 03:48:17 -05:00
|
|
|
# config
|
2018-03-21 06:10:12 -04:00
|
|
|
if [ -f "/etc/fenrirscreenreader/settings/settings.conf" ]; then
|
2017-02-19 20:27:26 -05:00
|
|
|
echo "Do you want to overwrite your current global settings? (y/n)"
|
2017-02-17 03:48:17 -05:00
|
|
|
read yn
|
2017-02-19 08:48:07 -05:00
|
|
|
if [ $yn = "Y" -o $yn = "y" ]; then
|
2018-03-21 06:10:12 -04:00
|
|
|
mv /etc/fenrirscreenreader/settings/settings.conf /etc/fenrirscreenreader/settings/settings.conf.bak
|
2017-02-19 20:27:26 -05:00
|
|
|
echo "Your old settings.conf has been backed up to settings.conf.bak."
|
2018-03-21 06:10:12 -04:00
|
|
|
install -m644 -D "config/settings/settings.conf" /etc/fenrirscreenreader/settings/settings.conf
|
2017-02-17 03:54:33 -05:00
|
|
|
else
|
2018-03-21 06:10:12 -04:00
|
|
|
install -m644 -D "config/settings/settings.conf" /etc/fenrirscreenreader/settings/settings.conf.current
|
2017-02-17 03:48:17 -05:00
|
|
|
fi
|
2017-02-26 12:33:31 -05:00
|
|
|
else
|
2018-03-21 06:10:12 -04:00
|
|
|
install -m644 -D "config/settings/settings.conf" /etc/fenrirscreenreader/settings/settings.conf
|
2017-02-26 12:33:31 -05:00
|
|
|
fi
|
2017-02-17 03:48:17 -05:00
|
|
|
|
|
|
|
|
|
|
|
# end message
|
2016-10-22 16:53:24 -04:00
|
|
|
cat << EOF
|
2017-02-19 20:27:26 -05:00
|
|
|
Installation complete.
|
2018-03-21 06:10:12 -04:00
|
|
|
install path:/opt/fenrirscreenreader
|
|
|
|
settings path:/etc/fenrirscreenreader
|
2017-02-19 09:11:53 -05:00
|
|
|
|
2019-01-24 03:44:29 -05:00
|
|
|
To test Fenrir:
|
|
|
|
sudo fenrir
|
|
|
|
|
|
|
|
To have Fenrir start on system boot using systemd:
|
2019-01-24 03:43:44 -05:00
|
|
|
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
|
2016-10-22 16:53:24 -04:00
|
|
|
sudo systemctl enable fenrir
|
2017-02-19 09:11:53 -05:00
|
|
|
|
2016-10-22 16:53:24 -04:00
|
|
|
Pulseaudio users may want to run
|
2018-03-21 06:10:12 -04:00
|
|
|
/usr/share/fenrirscreenreader/tools/configure_pulse.sh
|
2017-08-12 06:38:03 -04:00
|
|
|
once from their user account, then once from the root.
|
2016-10-22 16:53:24 -04:00
|
|
|
EOF
|