updated on Wed Jan 25 16:08:47 UTC 2012
[aur-mirror.git] / mmex-svn / mmex.install
blob0c54f360f517981173cfe65c3951a739bf7ebfc0
1 GB=/var/run/mmex
2 GEN="$(grep '#.*en_GB' /etc/locale.gen)"
4 post_install() {
5   if [[ $GEN ]]; then
6     sed -i 's/#.*\(en_GB.*\)/\1/' /etc/locale.gen
7     locale-gen &> /dev/null
8     install -dm755 $GB
9   fi
11   echo "==> Copy currency_seed.db3 to ~/.mmex:"
12   echo "  -> mkdir -p ~/.mmex"
13   echo "  -> cp /usr/share/mmex/res/currency_seed.db3 ~/.mmex"
16 post_upgrade() {
17   post_install $1
20 pre_remove() {
21   if [[ -d $GB && ! $GEN ]]; then
22     sed -i 's/en_GB.*/#&/' /etc/locale.gen
23     locale-gen &> /dev/null
24   fi
25   rm -rf $GB