changeset 661:b42ae513d7ae

Added command to build script to compress the resulting executable using UPX. git-svn-id: svn://svn.code.sf.net/p/universalindent/code/trunk@923 59b1889a-e5ac-428c-b0c7-476e01d41282
author thomas_-_s <thomas_-_s@59b1889a-e5ac-428c-b0c7-476e01d41282>
date Thu, 12 Feb 2009 14:51:29 +0000
parents bc00f26bf293
children 506b9bb83ecc
files buildRelease.sh
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/buildRelease.sh	Thu Feb 12 10:48:02 2009 +0000
+++ b/buildRelease.sh	Thu Feb 12 14:51:29 2009 +0000
@@ -308,6 +308,17 @@
     echo "ERROR: Could not copy file \"$targetName$ext\" \"./$targetDir/\"!"
     exit 1
 fi
+
+# Try to compress the executable with UPX.
+if [ "$targetSystem" = "win32" ] || [ "$targetSystem" = "linux" ]; then
+    echo "Trying to compress the executalbe using UPX."
+    upx$ext --best ./$targetDir/$targetName$ext &> /dev/null
+fi
+if [ $? -gt 0 ]; then
+    echo "Compressing the executable using UPX failed. Perhaps UPX doesn't exist."
+else
+    echo "Compressed the executable using UPX."
+fi
 echo "Done"
 echo ""