summaryrefslogtreecommitdiff
path: root/games/armagetronad/doinst.sh
diff options
context:
space:
mode:
authorponce <matteo.bernardini@gmail.com>2010-12-26 11:38:57 -0600
committerNiels Horn <niels.horn@slackbuilds.org>2010-12-27 20:12:23 -0200
commite0dbc16969689f9123dfc9d4b47c0589ee2c8c25 (patch)
tree239318c53d26222848215c2193cd7182258e66f1 /games/armagetronad/doinst.sh
parent087c1f836298da2c53e26b58461651ec20df2849 (diff)
downloadslackbuilds-e0dbc16969689f9123dfc9d4b47c0589ee2c8c25.tar.gz
games/armagetronad: Added (old school Tron lightcycles openGL game)
Signed-off-by: Erik Hanson <erik@slackbuilds.org>
Diffstat (limited to 'games/armagetronad/doinst.sh')
-rw-r--r--games/armagetronad/doinst.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/games/armagetronad/doinst.sh b/games/armagetronad/doinst.sh
new file mode 100644
index 0000000000..ad6d1cebb5
--- /dev/null
+++ b/games/armagetronad/doinst.sh
@@ -0,0 +1,33 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+CONFIGS="aiplayers.cfg \
+ default.cfg \
+ keys_cursor.cfg \
+ keys_cursor_single.cfg \
+ keys_twohand.cfg \
+ keys_wasd.cfg \
+ keys_x.cfg \
+ keys_zqsd.cfg \
+ settings.cfg \
+ settings_authentication.cfg \
+ settings_dedicated.cfg \
+ settings_visual.cfg"
+for config in $CONFIGS ;
+do
+ config etc/armagetronad/$config.new ;
+done