I would like to do this:
$jobName = ((get-item (get-location)).parent.name).ToUpper()
cd module\build
$current = pwd
$env:APP_HOME_$jobName = $current
but I get:
Unexpected token 'jobName' in expression or statement.
At line:1 char:23
+ $env:APP_HOME_$jobName <<<< = $current
+ CategoryInfo : ParserError: (jobName:String) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnexpectedToken
How do I set an environment variable that is based on another variable?