fenrir/install.sh

56 lines
1.8 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 cancil, or enter to continue." continue
2017-02-17 03:48:17 -05:00
# fenrir main application
2016-10-22 16:53:24 -04:00
install -m755 -d /opt/fenrir
2017-02-17 03:48:17 -05:00
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
2017-02-17 03:48:17 -05:00
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/
2017-02-17 03:54:33 -05:00
# 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
2017-02-17 03:48:17 -05:00
2017-02-17 03:54:33 -05:00
# punctuation
install -m755 -d /etc/fenrir/punctuation
2017-02-17 03:48:17 -05:00
cp -a config/punctuation/* /etc/fenrir/punctuation
# sound
2016-11-04 16:32:35 -04:00
install -d /usr/share/sounds/fenrir
2017-02-17 03:48:17 -05:00
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
2017-02-17 03:48:17 -05:00
# config
2017-02-17 03:54:33 -05:00
if [ -f "/etc/fenrir/settings/settings.conf" ]; then
2017-02-17 03:48:17 -05:00
echo "Do you want overwrite your current settings? (y/n)"
read yn
2017-02-17 03:54:33 -05:00
if [ $yn = "Y" -o $yn = "y"]; then
mv /etc/fenrir/settings/settings.conf /etc/fenrir/settings/settings.conf.bak
2017-02-17 03:48:17 -05:00
install -m644 -D "config/settings/settings.conf" /etc/fenrir/settings/settings.conf
2017-02-17 03:54:33 -05:00
else
install -m644 -D "config/settings/settings.conf" /etc/fenrir/settings/settings.conf.current
2017-02-17 03:48:17 -05:00
fi
fi
# end message
2016-10-22 16:53:24 -04:00
cat << EOF
2017-02-17 03:48:17 -05:00
To test fenrir
sudo systemctl start fenrir
2016-10-22 16:53:24 -04:00
To have fenrir start at boot:
sudo systemctl enable fenrir
Pulseaudio users may want to run
/usr/share/fenrir/tools/configure-pulseaudio
once as their user account and once as root.
EOF