diff options
author | Nick Daly <myownlittlworld@hotmail.com> | 2009-06-06 22:19:17 -0500 |
---|---|---|
committer | Nick Daly <myownlittlworld@hotmail.com> | 2009-06-06 22:19:17 -0500 |
commit | 84a273cfaed391a8008396e595cc1fa347aa2a5c (patch) | |
tree | 14cf7ad4febb5fa9e78e35f9478837c0e16062a9 /includes/generic-includes.sh | |
parent | dd34bc368e59b1760cb4c0c56fa8f2ad14e6f8c6 (diff) | |
download | gemrb-gameinstallers-84a273cfaed391a8008396e595cc1fa347aa2a5c.tar.bz2 gemrb-gameinstallers-84a273cfaed391a8008396e595cc1fa347aa2a5c.zip |
Installer doesn't crash when installing BG2-SOA.
Still not sure how if it works though.
Diffstat (limited to 'includes/generic-includes.sh')
-rw-r--r-- | includes/generic-includes.sh | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/includes/generic-includes.sh b/includes/generic-includes.sh index 1ed5472..3e3ef36 100644 --- a/includes/generic-includes.sh +++ b/includes/generic-includes.sh @@ -143,7 +143,7 @@ function copylower # usage: copylower source destination if [ -d "$1" ]; then for filename in $(find "$1" -type f); do - lowerpath="$(echo $filename|gawk -F "$1" '{print $2}'|tr A-Z a-z)" + lowerpath="$(echo $filename|gawk -F '$1' '{print $2}'|tr A-Z a-z)" cp -f "$filename" "$2/$lowerpath" || die done elif [ -f "$1" ]; then @@ -158,7 +158,7 @@ function setlower if [ "$1" ] then cd "$1" - for each_file in "`find ./ -iname "*"`" + for each_file in `find ./ -iname "*"` do lower="`echo "$each_file" | tr "[:upper:]" "[:lower:]"`" @@ -174,9 +174,12 @@ function move_and_remove { # usage: move_and_remove source destination # copies the files in the source directory to the destination. - mkdir -p "$2" || die - cp -R "$1/"* "$2" || die - rm -r "$1" + if [ "$1" != "$2" ] + then + mkdir -p "$2" || die + cp -R "$1/"* "$2" || die + rm -r "$1" + fi } function teardown |