diff options
author | Dan-Simon Myrland | 2017-03-24 15:37:03 +0100 |
---|---|---|
committer | David Spencer | 2017-03-25 01:07:32 +0100 |
commit | c4d7eaadaf40edadb9c225830888ab618d355e21 (patch) | |
tree | af54b938e8ca500e35eac510681c3b88a6c57b78 /games/typespeed/doinst.sh | |
parent | b43ce214467ee83ce999b6272fe652ce427f526e (diff) | |
download | slackbuilds-c4d7eaadaf40edadb9c225830888ab618d355e21.tar.gz |
games/typespeed: Added (ncurses typing game).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'games/typespeed/doinst.sh')
-rw-r--r-- | games/typespeed/doinst.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/games/typespeed/doinst.sh b/games/typespeed/doinst.sh new file mode 100644 index 0000000000..83fdd2e0d1 --- /dev/null +++ b/games/typespeed/doinst.sh @@ -0,0 +1,14 @@ +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... +} + +config etc/typespeedrc.new |