I want to automate my process of align and signing an APK (an app for Android). I use git bash as terminal inside VSCODE.
For this I am concatenating the commands I need into a shell script but I got a problem with the windows variables. Since the android SDK installs it self automatically on C:\Users\myUserName\AppData\Local
I can access it using %LocalAppData%
on CMD but not in bash because it throws:
$ %LocalAppData%
bash: fg: %LocalAppData%: no such job
Of course I would just write the complete path but it will make my script useless on my laptop and/or another machine that is not where I wrote the script.
Is there a way to access %LocalAppData%
with git bash?
Best Answer
Is there a way to access
%LocalAppData%
with git bash?Assuming git bash maps Windows environment variables to bash variables then you access them using
$VARIABLENAME
.Cygwin bash example:
To list environment variables use
env
:Further Reading