From 85c146caf2982834ded77b34b0559b6acc45838d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Sat, 29 Jun 2013 15:20:40 +0200 Subject: [PATCH] don't break if FILES contain spaces --- packaging/package-all.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packaging/package-all.sh b/packaging/package-all.sh index 46bd06055a..93c62b66b1 100755 --- a/packaging/package-all.sh +++ b/packaging/package-all.sh @@ -28,14 +28,17 @@ markdown DOCUMENTATION.md > DOCUMENTATION.html # List of files that are packaged on all platforms # Note that the Tao dlls are shipped on all platforms except osx and that # they are now installed to the game directory instead of placed in the gac -FILES="OpenRA.Game.exe OpenRA.Editor.exe OpenRA.Utility.exe OpenRA.FileFormats.dll \ -OpenRA.Renderer.SdlCommon.dll OpenRA.Renderer.Cg.dll OpenRA.Renderer.Gl.dll OpenRA.Renderer.Null.dll \ -FreeSans.ttf FreeSansBold.ttf titles.ttf Dune2k.ttf cg glsl mods/ra mods/cnc mods/d2k \ -AUTHORS README.html CONTRIBUTING.html DOCUMENTATION.html COPYING HACKING INSTALL CHANGELOG" +FILES=('OpenRA.Game.exe' 'OpenRA.Editor.exe' 'OpenRA.Utility.exe' \ +'OpenRA.FileFormats.dll' 'OpenRA.Renderer.SdlCommon.dll' 'OpenRA.Renderer.Cg.dll' 'OpenRA.Renderer.Gl.dll' 'OpenRA.Renderer.Null.dll' \ +'FreeSans.ttf' 'FreeSansBold.ttf' 'titles.ttf' 'Dune2k.ttf' \ +'cg' 'glsl' 'mods/ra' 'mods/cnc' 'mods/d2k' \ +'AUTHORS' 'COPYING' 'HACKING' 'INSTALL' 'CHANGELOG' \ +'README.html' 'CONTRIBUTING.html' 'DOCUMENTATION.html' \ +'global mix database.dat') echo "Copying files..." -for i in $FILES; do - cp -R "$i" "packaging/built/$i" || exit 3 +for i in "${FILES[@]}"; do + cp -R "${i}" "packaging/built/${i}" || exit 3 done # Copy Tao @@ -59,9 +62,6 @@ cp OpenRA.Game/OpenRA.ico packaging/built # Remove demo.mix from cnc rm ./packaging/built/mods/cnc/bits/demo.mix -# Workaround for problems with spaces in filenames. -cp "global mix database.dat" packaging/built - # # Change into packaging directory and run the # platform-dependant packaging in parallel