a2cloud/setup/kegs.txt

29 lines
880 B
Plaintext
Raw Normal View History

2015-10-30 12:34:48 +00:00
#! /bin/bash
# vim: set tabstop=4 shiftwidth=4 expandtab filetype=sh:
2015-10-30 11:57:07 +00:00
if [[ ! $DISPLAY ]]; then
echo "Please run KEGS in an X Window."
echo "(If you are using the console, type 'startx'.)"
else
if [[ -f /usr/local/lib/rom.kegs ]]; then
if [[ ! $(grep snd-pcm-oss /etc/modules) ]]; then
echo "Configuring KEGS sound..."
echo "snd-pcm-oss" | sudo tee -a /etc/modules > /dev/null
[[ ! $(lsmod | grep snd_pcm_oss) ]] && sudo modprobe snd-pcm-oss
fi
2015-10-30 12:38:31 +00:00
2015-10-30 11:57:07 +00:00
if [[ ! $(dpkg -l xfonts-base 2> /dev/null | grep '^ii') ]]; then
echo "Configuring KEGS fonts..."
sudo apt-get -y update
sudo apt-get -y install xfonts-base &> /dev/null
sudo apt-get -y clean
2015-10-30 12:38:31 +00:00
fi
2015-10-30 11:57:07 +00:00
exec xkegs
else
kegs-setup
[[ $? -ne 0 ]] && exit 1
exec kegs
fi
fi