summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2007-01-10 23:33:03 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2007-01-10 23:33:03 (GMT)
commitf015e1ff0345e5ace58d4df0ea4bfc09b5f4d760 (patch)
tree129daeae2560641e90d59ed80119106f69edf342
parentde5540f7e5215ea1cce982f5e7357f4999c3f908 (diff)
downloadCMake-f015e1ff0345e5ace58d4df0ea4bfc09b5f4d760.zip
CMake-f015e1ff0345e5ace58d4df0ea4bfc09b5f4d760.tar.gz
CMake-f015e1ff0345e5ace58d4df0ea4bfc09b5f4d760.tar.bz2
ENH: Change permission for getdisplay.sh to make the runtimescript work
-rwxr-xr-xModules/CPack.RuntimeScript.in7
1 files changed, 6 insertions, 1 deletions
diff --git a/Modules/CPack.RuntimeScript.in b/Modules/CPack.RuntimeScript.in
index 9195d52..1ce43bc 100755
--- a/Modules/CPack.RuntimeScript.in
+++ b/Modules/CPack.RuntimeScript.in
@@ -22,12 +22,17 @@ else
echo \$DISPLAY > "$TMP/display"
fi
__END_OF_GETDISPLAY_SCRIPT__
+chmod +x "$TMP/getdisplay.sh"
rm -f $TMP/display
open-x11 $TMP/getdisplay.sh || \
open -a XDarwin $TMP/getdisplay.sh || \
echo ":0" > $TMP/display
-while [ "$?" == "0" -a ! -f $TMP/display ]; do sleep 1; done
+while [ "$?" == "0" -a ! -f $TMP/display ];
+do
+ #echo "Waiting for display $TMP/display"
+ sleep 1;
+done
export "DISPLAY=`cat $TMP/display`"
ps -wx -ocommand | grep -e '[X]11' > /dev/null || exit 11