[Glass] run topaz from bash and have access to arguments from topaz smalltalk

Mariano Martinez Peck marianopeck at gmail.com
Mon Jan 13 06:31:52 PST 2014


Hi guys,

In Norbert's utilize, we have this nice script runTopazScript.sh :

#!/bin/sh

source $APPLICATION_DIR/env

if [ -z \$1 ];
then
   echo "no script name given"
fi

cat ../scripts/login.st \$1 | su -m $GEMSTONE_USER -c \"$GEMSTONE/bin/topaz
-ql -T200000 \"


That let us automatically connect to GemStone using an auto-generated
.topazini. So we can pass around a topaz script and that would be execute.
So we can do for example:

sudo sh ./runTopazScript.sh something.tpz

Now....I saw in several topaz scripts from seaside that the SMALLTALK code
is able to directly access the argument variables to the shell. For
example, startSeaside30_adaptor does:

GsFile gciLogServer: '$1 Server started on port ', $2 printString.

I want to do the same in my something.tpz. Imagine I have this
something.tpz file:

run
$1 printString.
%

And I execute:

sudo sh ./runTopazScript.sh something.tpz mariano

So how can we adapt the script so that such a smalltalk script outputs
'mariano' instead of the literal string $1 ?

I tried adding a  & at the end of the topaz call and many other workarounds
but I am not sure if topaz needs something special for this.


Thanks a lot in advance and sorry for the offtopic.

-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20140113/53eae85e/attachment-0001.html>


More information about the Glass mailing list