STYLE: apply patch from Thomas Klausner (NetBSD): use "=" for testing
strings for equality instead of "==" This also matches what the man page for test says "s1 = s2 True if the strings s1 and s2 are identical." Alex
This commit is contained in:
parent
d50785e26e
commit
0543448907
|
@ -6,7 +6,7 @@ CWD="`dirname \"$0\"`"
|
||||||
TMP=/tmp/$UID/TemporaryItems
|
TMP=/tmp/$UID/TemporaryItems
|
||||||
|
|
||||||
version=`sw_vers -productVersion`
|
version=`sw_vers -productVersion`
|
||||||
if [ "$?" == "0" ]; then
|
if [ "$?" = "0" ]; then
|
||||||
major=${version%%\.*}
|
major=${version%%\.*}
|
||||||
rest=${version#*\.}
|
rest=${version#*\.}
|
||||||
minor=${rest%%\.*}
|
minor=${rest%%\.*}
|
||||||
|
@ -36,7 +36,7 @@ cat << __END_OF_GETDISPLAY_SCRIPT__ > "$TMP/getdisplay.sh"
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
mkdir -p "$TMP"
|
mkdir -p "$TMP"
|
||||||
|
|
||||||
if [ "\$DISPLAY"x == "x" ]; then
|
if [ "\$DISPLAY"x = "x" ]; then
|
||||||
echo :0 > "$TMP/display"
|
echo :0 > "$TMP/display"
|
||||||
else
|
else
|
||||||
echo \$DISPLAY > "$TMP/display"
|
echo \$DISPLAY > "$TMP/display"
|
||||||
|
@ -48,7 +48,7 @@ open-x11 $TMP/getdisplay.sh || \
|
||||||
open -a XDarwin $TMP/getdisplay.sh || \
|
open -a XDarwin $TMP/getdisplay.sh || \
|
||||||
echo ":0" > $TMP/display
|
echo ":0" > $TMP/display
|
||||||
|
|
||||||
while [ "$?" == "0" -a ! -f $TMP/display ];
|
while [ "$?" = "0" -a ! -f $TMP/display ];
|
||||||
do
|
do
|
||||||
#echo "Waiting for display $TMP/display"
|
#echo "Waiting for display $TMP/display"
|
||||||
sleep 1;
|
sleep 1;
|
||||||
|
|
Loading…
Reference in New Issue