[acme-sac commit] r174 - trunk

6 views
Skip to first unread message

codesite...@google.com

unread,
Jun 6, 2008, 1:21:48 AM6/6/08
to acme...@googlegroups.com
Author: underspecified
Date: Thu Jun 5 22:21:01 2008
New Revision: 174

Modified:
trunk/acme-sac

Log:
Added -x11 flag to allow for the X11 version of Acme SAC to be started
from the command line.


Modified: trunk/acme-sac
==============================================================================
--- trunk/acme-sac (original)
+++ trunk/acme-sac Thu Jun 5 22:21:01 2008
@@ -6,26 +6,35 @@
export EMU=emu
export osMajorVer=`uname -r | cut -f1 -d.`

-if ( uname -s | grep -i linux >/dev/null )
-then
+if ( uname -s | grep -i linux >/dev/null ); then
SYSHOST=Linux
fi

-if ( uname -p | grep -i power >/dev/null )
-then
+if ( uname -p | grep -i power >/dev/null ); then
OBJTYPE=power
fi

-if [ ! -f $acmedir/sys/$SYSHOST/386/bin/$EMU ]
-then
- OBJTYPE=power
+if [ "$SYSHOST" = "MacOSX" ] && [ "$osMajorVer" -lt 8 ]; then
+ EMU=emu-x11
fi

-if [ "$SYSHOST" = "MacOSX" ] && [ "$osMajorVer" -lt 8 ]
-then
- export EMU=emu-x11
+case $1 in
+ -x|-x11|-X|-X11)
+ if [ -f sys/$SYSHOST/$OBJTYPE/bin/emu-x11 ]; then
+ EMU=emu-x11
+ fi
+ shift 1
+ ;;
+ *)
+ break
+ ;;
+esac
+
+if [ "$EMU" = "emu-x11" ]; then
export DISPLAY=":0"
- open /Applications/Utilities/X11.app
+ if [[ $osMajorVer < 9 ]]; then
+ open /Applications/Utilities/X11.app
+ fi
fi

cd $acmedir

Tim Wiess

unread,
Jun 6, 2008, 12:25:23 PM6/6/08
to acme...@googlegroups.com
I'm not sure I quite understand the need for this. This seems to be a
OS X specific flag since the separate emu-x11 is only used on OS X
(I assume). But EMU is already being set appropriately for this by the other
change you made:

if [ "$SYSHOST" = "MacOSX" ] && [ "$osMajorVer" -lt 8 ]; then

EMU=emu-x11
fi

So the flag seems superfluous.
Apologies if I'm just missing something else here.

tim

underspecified

unread,
Jun 6, 2008, 7:15:22 PM6/6/08
to acme...@googlegroups.com
I wanted to make it easier to manually call the X11 version, mainly
for testing purposes.
It"s easiest to do this in the acme-sac script because it will set
$DISPLAY and open X11.

--underspecified

Reply all
Reply to author
Forward
0 new messages