diff options
author | NickDaly <myownlittlworld@hotmail.com> | 2009-06-06 17:55:30 -0500 |
---|---|---|
committer | NickDaly <myownlittlworld@hotmail.com> | 2009-06-06 17:55:30 -0500 |
commit | c93108cc3cbc1cc685811776b9b771aef34fa25f (patch) | |
tree | 7984a62541e7a0e94cfa6dc2ebc4665a6d4434a4 /includes/generic-includes.sh | |
parent | f197b4b654ec882a333e9d488163a75cb3fb83e5 (diff) | |
download | gemrb-gameinstallers-c93108cc3cbc1cc685811776b9b771aef34fa25f.tar.bz2 gemrb-gameinstallers-c93108cc3cbc1cc685811776b9b771aef34fa25f.zip |
Moved the list of games into an external file (includes/cd-list.sh).
Diffstat (limited to 'includes/generic-includes.sh')
-rw-r--r-- | includes/generic-includes.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/includes/generic-includes.sh b/includes/generic-includes.sh index ac62dd2..1ed5472 100644 --- a/includes/generic-includes.sh +++ b/includes/generic-includes.sh @@ -152,6 +152,24 @@ function copylower fi } +function setlower +{ + # usage: setlower target + if [ "$1" ] + then + cd "$1" + for each_file in "`find ./ -iname "*"`" + do + lower="`echo "$each_file" | tr "[:upper:]" "[:lower:]"`" + + if [ "$each_file" != "$lower" ] + then + mv "$each_file" "$lower" + fi + done + fi +} + function move_and_remove { # usage: move_and_remove source destination @@ -160,3 +178,14 @@ function move_and_remove cp -R "$1/"* "$2" || die rm -r "$1" } + +function teardown +{ + # usage: teardown target + if [ "$1" ] + then + cleanuptmp + setperms "$1" + setlower "$1" + fi +} |