How to intialize a variable from another script in bash?
- by Zombies
How can I set my intial variables in a re-usable way? I tried to do this by invoking something like this in my child script:
 ./init.bash
And inside init.bash:
prod="false"
if [ "$prod" == "prod" ]
then
    RUN_DIR=/home/windsor/.scripts/websites
    JAVA_DIR=/home/windsor/prog/websitechecker
    OUT_DIR=/tmp/
    DB="prod"
else
    if [ ! -a /tmp/test ]
    then
        mkdir /tmp/test
    fi
    DB="mydb"
    OUT_DIR=/tmp/test/
    RUN_DIR=/home/windsor/workspaces/bash/websites
    JAVA_DIR=/home/windsor/workspaces/java/testrun
fi
cd $RUN_DIR