fenrir/install.sh

66 lines
2.4 KiB
Bash
Raw Normal View History

2016-10-22 16:53:24 -04:00
#!/bin/bash
#Basic install script for Fenrir.
read -p "This will install Fenrir. Press ctrl+C to cancel, or enter to continue." continue
2017-02-17 03:48:17 -05:00
# Fenrir main application
install -m755 -d /opt/fenrirscreenreader
cp -af src/* /opt/fenrirscreenreader
2018-06-17 18:31:50 -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
install -m755 -d /usr/share/fenrirscreenreader/tools
cp -af tools/* /usr/share/fenrirscreenreader/tools
2017-02-17 03:48:17 -05:00
# scripts
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
install -m644 -D "config/keyboard/desktop.conf" /etc/fenrirscreenreader/keyboard/desktop.conf
install -m644 -D "config/keyboard/laptop.conf" /etc/fenrirscreenreader/keyboard/laptop.conf
2017-02-17 03:48:17 -05:00
2017-02-17 03:54:33 -05:00
# punctuation
install -m755 -d /etc/fenrirscreenreader/punctuation
cp -af config/punctuation/* /etc/fenrirscreenreader/punctuation
2017-02-17 03:48:17 -05:00
# 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
2017-02-17 03:48:17 -05:00
# config
if [ -f "/etc/fenrirscreenreader/settings/settings.conf" ]; then
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
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
2017-02-17 03:54:33 -05:00
else
install -m644 -D "config/settings/settings.conf" /etc/fenrirscreenreader/settings/settings.conf.current
2017-02-17 03:48:17 -05:00
fi
else
install -m644 -D "config/settings/settings.conf" /etc/fenrirscreenreader/settings/settings.conf
fi
2017-02-17 03:48:17 -05:00
# end message
2016-10-22 16:53:24 -04:00
cat << EOF
Installation complete.
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
/usr/share/fenrirscreenreader/tools/configure_pulse.sh
once from their user account, then once from the root.
2016-10-22 16:53:24 -04:00
EOF