Hi,
As I'm trying to write a checkpassword B4J application (Linux) my problem now boils down to this very small bash script for which I would need a B4J equivalent.
What it does (I thinks is):
- when an environment variable AUTHORIZED = 1 then set it equal to 2
- execute a command which fully qualified name was passed as an argument to the script
Can this be coded in B4J ?
Thanks !
Note: I guess this question boils down to: how can I set environment variables for a subprocess to be started with jShell ?
A workaround might be to start a bash script with jShell that sets the environment variable and then launch the application ?
As I'm trying to write a checkpassword B4J application (Linux) my problem now boils down to this very small bash script for which I would need a B4J equivalent.
What it does (I thinks is):
- when an environment variable AUTHORIZED = 1 then set it equal to 2
- execute a command which fully qualified name was passed as an argument to the script
B4X:
#!/bin/bash
CHECKPASSWORD_REPLY_BINARY="$1"
[ "$AUTHORIZED" != 1 ] || export AUTHORIZED=2
exec "$1"
Can this be coded in B4J ?
Thanks !
Note: I guess this question boils down to: how can I set environment variables for a subprocess to be started with jShell ?
A workaround might be to start a bash script with jShell that sets the environment variable and then launch the application ?
Last edited: