summaryrefslogtreecommitdiffstats
path: root/pychathans/install.sh
diff options
context:
space:
mode:
authorPraveen Arimbrathodiyil <pravi.a@gmail.com>2009-02-15 06:04:21 -0800
committerPraveen Arimbrathodiyil <pravi.a@gmail.com>2009-02-15 06:04:21 -0800
commitd2806de65e1bc455881e0860d0f6879660fd69a7 (patch)
tree835b3363aae98ba9d8deeefc6b762cb3d43fc52d /pychathans/install.sh
parent5cb8b5533d4ce9d9ac8cd262408e8fbb0bcd99f1 (diff)
parenta8b8b2feda6d82ce0a28ee4a5b9bca0ed56291c1 (diff)
downloadRachana.git-d2806de65e1bc455881e0860d0f6879660fd69a7.tar.gz
Rachana.git-d2806de65e1bc455881e0860d0f6879660fd69a7.tar.xz
Rachana.git-d2806de65e1bc455881e0860d0f6879660fd69a7.zip
Merge branch 'master' of praveen_a@git.sv.gnu.org:/srv/git/smc
Diffstat (limited to 'pychathans/install.sh')
-rwxr-xr-xpychathans/install.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/pychathans/install.sh b/pychathans/install.sh
new file mode 100755
index 0000000..ffb855f
--- /dev/null
+++ b/pychathans/install.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+#
+# Copyright (c) 2009 Rajeesh K Nambiar <rajeeshknambiar@gmail.com>
+# This program is a free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+if [ $UID -ne 0 ]; then
+ echo "You need to be root to install Chathans"
+ exit 1
+fi
+
+install -m 0755 chathans.py /usr/bin/chathans
+install -m 0644 chathans.desktop /usr/share/applications/chathans.desktop
+for lc in po/chathans-*.po; do
+ mo_file=po/`basename ${lc} .po`.mo
+ msgfmt -o ${mo_file} ${lc}
+ _lang=`echo ${lc} | cut -d - -f2 | cut -d . -f1`
+ mkdir -p /usr/share/locale/${_lang}/LC_MESSAGES/
+ install -m 0644 ${mo_file} /usr/share/locale/${_lang}/LC_MESSAGES/chathans.mo
+done
+echo "Installation complete"
+exit 0