summaryrefslogtreecommitdiffstats
path: root/Modules/CPack.RuntimeScript.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-10-05 17:14:30 (GMT)
committerBrad King <brad.king@kitware.com>2009-10-05 17:14:30 (GMT)
commitb13346756753cb8cd26f6436abcd4b303f057776 (patch)
treea6c568ee8bf1bf661ce6064127b2f1f3b044add1 /Modules/CPack.RuntimeScript.in
parent57ece74730233c120a406f08a7498f44df5e0055 (diff)
downloadCMake-b13346756753cb8cd26f6436abcd4b303f057776.zip
CMake-b13346756753cb8cd26f6436abcd4b303f057776.tar.gz
CMake-b13346756753cb8cd26f6436abcd4b303f057776.tar.bz2
CPack: Fix bash-isms in launch script
Patch from Raphael Geissert and Modestas Vainius. See issue #9659.
Diffstat (limited to 'Modules/CPack.RuntimeScript.in')
-rwxr-xr-xModules/CPack.RuntimeScript.in8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/CPack.RuntimeScript.in b/Modules/CPack.RuntimeScript.in
index eaecdd8..f27444f 100755
--- a/Modules/CPack.RuntimeScript.in
+++ b/Modules/CPack.RuntimeScript.in
@@ -3,10 +3,10 @@
# Modified from: Aaron Voisine <aaron@voisine.org>
CWD="`dirname \"$0\"`"
-TMP=/tmp/$UID/TemporaryItems
+TMP=/tmp/$(id -ru)/TemporaryItems
version=`sw_vers -productVersion`
-if [ "$?" == "0" ]; then
+if [ "$?" = "0" ]; then
major=${version%%\.*}
rest=${version#*\.}
minor=${rest%%\.*}
@@ -24,7 +24,7 @@ echo "Build = $build"
# if 10.5 or greater, then all the open-x11 stuff need not occur
-if ((( $major < 10 )) || ((( $major == 10)) && (( $minor < 5 )))); then
+if [ "$major" -lt 10 ] || ([ "$major" -eq 10 ] && [ "$minor" -lt 5 ]); then
version=`sw_vers -productVersion`
if [ "$?" = "0" ]; then
major=${version%%\.*}
@@ -44,7 +44,7 @@ echo "Build = $build"
# if 10.5 or greater, then all the open-x11 stuff need not occur
-if ((( $major < 10 )) || ((( $major == 10)) && (( $minor < 5 )))); then
+if [ "$major" -lt 10 ] || ([ "$major" -eq 10 ] && [ "$minor" -lt 5 ]); then
ps -wx -ocommand | grep -e '[X]11.app' > /dev/null
if [ "$?" != "0" -a ! -f ~/.xinitrc ]; then
echo "rm -f ~/.xinitrc" > ~/.xinitrc