You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/games-strategy/ja2-stracciatella/files/ja2-convert.sh

17 lines
411 B

#!/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