diff options
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 +} |