summaryrefslogtreecommitdiff
path: root/games-strategy/ja2-stracciatella/files/ja2-convert.sh
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /games-strategy/ja2-stracciatella/files/ja2-convert.sh
reinit the tree, so we can have metadata
Diffstat (limited to 'games-strategy/ja2-stracciatella/files/ja2-convert.sh')
-rw-r--r--games-strategy/ja2-stracciatella/files/ja2-convert.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/games-strategy/ja2-stracciatella/files/ja2-convert.sh b/games-strategy/ja2-stracciatella/files/ja2-convert.sh
new file mode 100644
index 000000000000..4f337ca75351
--- /dev/null
+++ b/games-strategy/ja2-stracciatella/files/ja2-convert.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+# Convert names of data-files to lower-case
+
+# location of the data-files
+GAMES_DATADIR=@GAMES_DATADIR@
+
+cd "${GAMES_DATADIR}" || exit 1
+
+# convert to lowercase
+find . -exec sh -c 'echo "${1}"
+lower="`echo "${1}" | tr [:upper:] [:lower:]`"
+[ -d `dirname "${lower}"` ] || mkdir `dirname ${lower}`
+[ "${1}" = "${lower}" ] || mv "${1}" "${lower}"' - {} \;
+
+# remove leftover
+rm -r ./TILECACHE ./STSOUNDS