How to read external variables from topaz command line?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

How to read external variables from topaz command line?

GLASS mailing list
Hi guys, 

Is there a way to do this:

export GEMSTONE_UPGRADE_USERNAME="mariano"
export GEMSTONE_UPGRADE_PASSWORD="peck"

# run and enter topaz and then
topaz> set user $GEMSTONE_UPGRADE_USERNAME pass $GEMSTONE_UPGRADE_PASSWORD
topaz> login

?

It clearly doesn't work as is.  Any idea to know if it is possible?

--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: How to read external variables from topaz command line?

BrunoBB
Hi,

I think is kind of possible but not sure 100% as you want:

See:
1.15 Taking Topaz Input from a File

topaz 1> input $HOME/animal.gs

I was able to do:

topaz> input /tmp/login.txt

Where login.txt is:
set username DataCurator
set password mypwd
login

It works OK :)

Regards,
bruno
Reply | Threaded
Open this post in threaded view
|

Re: How to read external variables from topaz command line?

GLASS mailing list
uhhh that's a good idea Bruno :)  Thanks for sharing. 

On Tue, Oct 20, 2015 at 11:41 AM, BrunoBB via Glass <[hidden email]> wrote:
Hi,

I think is kind of possible but not sure 100% as you want:

See:
1.15 Taking Topaz Input from a File

topaz 1> input $HOME/animal.gs

I was able to do:

topaz> input /tmp/login.txt

Where login.txt is:
set username DataCurator
set password mypwd
login

It works OK :)

Regards,
bruno



--
View this message in context: http://forum.world.st/How-to-read-external-variables-from-topaz-command-line-tp4856749p4856775.html
Sent from the GLASS mailing list archive at Nabble.com.
_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass



--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: How to read external variables from topaz command line?

GLASS mailing list
Unfortunatly, it seems topaz can only see the variables that are exported in certain scenario (maybe those at boot time or something). For example it can see $HOME, but it can't see GEMSTONE_NAME    GEMSTONE_TRANLOGDIR   or any other of the variables  I export..
grrrrr

On Tue, Oct 20, 2015 at 11:57 AM, Mariano Martinez Peck <[hidden email]> wrote:
uhhh that's a good idea Bruno :)  Thanks for sharing. 

On Tue, Oct 20, 2015 at 11:41 AM, BrunoBB via Glass <[hidden email]> wrote:
Hi,

I think is kind of possible but not sure 100% as you want:

See:
1.15 Taking Topaz Input from a File

topaz 1> input $HOME/animal.gs

I was able to do:

topaz> input /tmp/login.txt

Where login.txt is:
set username DataCurator
set password mypwd
login

It works OK :)

Regards,
bruno



--
View this message in context: http://forum.world.st/How-to-read-external-variables-from-topaz-command-line-tp4856749p4856775.html
Sent from the GLASS mailing list archive at Nabble.com.
_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass



--



--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: How to read external variables from topaz command line?

BrunoBB
Hi,

But you can create a class to export those variables to a file and then from topaz input that file.

TopazExporter default exportMyVariablesTo: pathFile

Then:

topaz> input pathFile.

What are you trying to achieve ?
i not kwow if the above will help you...

Regards,
Bruno
Reply | Threaded
Open this post in threaded view
|

Re: How to read external variables from topaz command line?

GLASS mailing list
Hi Bruno,

What I am trying to do, is to input a file relative to the directory where the stone is located. If you use gsDevKit_home to manage your stones, what I mean is that I want to input a file relative to $GS_HOME/server/stones/stoneX/     
For example, if you see  $GS_HOME/server/stones/stoneX/stone.env  at the very end you see the exported variables. 
Or even if you don't use gsDevKit_home but you use the old seaside extent and defSeaside. Those export some variables as well. So at the end, what I want to do is something like this:

topaz1> input $GEMSTONE_STONE_DIR/myFile.txt

and myFile.txt being  $GS_HOME/server/stones/stoneX/myFile.txt

But topaz cannot see $GEMSTONE_STONE_DIR neither the rest of the exported variables, even if the shell in which I run topaz, DO see it. 

I can live without this and I do have a workaround, but just wondering if this would be possible. 

Thanks!
 

On Tue, Oct 20, 2015 at 2:40 PM, BrunoBB via Glass <[hidden email]> wrote:
Hi,

But you can create a class to export those variables to a file and then from
topaz input that file.

TopazExporter default exportMyVariablesTo: pathFile

Then:

topaz> input pathFile.

What are you trying to achieve ?
i not kwow if the above will help you...

Regards,
Bruno



--
View this message in context: http://forum.world.st/How-to-read-external-variables-from-topaz-command-line-tp4856749p4856840.html
Sent from the GLASS mailing list archive at Nabble.com.
_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass



--

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: How to read external variables from topaz command line?

GLASS mailing list
I think that the trick is that in general GeMSTone will do env varialble expansion for file names and not anywhere else ... so using a here document works:

  topaz --l << EOF
set user $GEMSTONE_UPGRADE_USERNAME pass $GEMSTONE_UPGRADE_PASSWORD
login
EOF

But this doesn't work for an interactive login ....

Dale


On 10/20/2015 11:01 AM, Mariano Martinez Peck via Glass wrote:
Hi Bruno,

What I am trying to do, is to input a file relative to the directory where the stone is located. If you use gsDevKit_home to manage your stones, what I mean is that I want to input a file relative to $GS_HOME/server/stones/stoneX/     
For example, if you see  $GS_HOME/server/stones/stoneX/stone.env  at the very end you see the exported variables. 
Or even if you don't use gsDevKit_home but you use the old seaside extent and defSeaside. Those export some variables as well. So at the end, what I want to do is something like this:

topaz1> input $GEMSTONE_STONE_DIR/myFile.txt

and myFile.txt being  $GS_HOME/server/stones/stoneX/myFile.txt

But topaz cannot see $GEMSTONE_STONE_DIR neither the rest of the exported variables, even if the shell in which I run topaz, DO see it. 

I can live without this and I do have a workaround, but just wondering if this would be possible. 

Thanks!
 

On Tue, Oct 20, 2015 at 2:40 PM, BrunoBB via Glass <[hidden email]> wrote:
Hi,

But you can create a class to export those variables to a file and then from
topaz input that file.

TopazExporter default exportMyVariablesTo: pathFile

Then:

topaz> input pathFile.

What are you trying to achieve ?
i not kwow if the above will help you...

Regards,
Bruno



--
View this message in context: http://forum.world.st/How-to-read-external-variables-from-topaz-command-line-tp4856749p4856840.html
Sent from the GLASS mailing list archive at Nabble.com.
_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass



--


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass