Correct batch detection algorimthm
Correct batch detection algorimthm

There are two shell-like things that we care about
 bash: does environment varible expansion with $
 batch: does environment varible expansion by surrounding something with %

so to detect batch, try to expand a variable on the shell with $.
If you get a $ back, you are in batch!

adamgreen/mbed,betzw/mbed-os,karsev/mbed-os,netzimme/mbed-os,kl-cruz/mbed-os,theotherjimmy/mbed,screamerbg/mbed,bulislaw/mbed-os,radhika-raghavendran/mbed-os5.1-onsemi,maximmbed/mbed,mbedmicro/mbed,maximmbed/mbed,j-greffe/mbed-os,svogl/mbed-os,infinnovation/mbed-os,monkiineko/mbed-os,tung7970/mbed-os-1,mikaleppanen/mbed-os,screamerbg/mbed,adamgreen/mbed,j-greffe/mbed-os,bulislaw/mbed-os,catiedev/mbed-os,pradeep-gr/mbed-os5-onsemi,betzw/mbed-os,fanghuaqi/mbed,monkiineko/mbed-os,bulislaw/mbed-os,cvtsi2sd/mbed-os,nRFMesh/mbed-os,radhika-raghavendran/mbed-os5.1-onsemi,HeadsUpDisplayInc/mbed,nRFMesh/mbed-os,mazimkhan/mbed-os,geky/mbed,bcostm/mbed-os,ryankurte/mbed-os,theotherjimmy/mbed,infinnovation/mbed-os,karsev/mbed-os,mazimkhan/mbed-os,c1728p9/mbed-os,kl-cruz/mbed-os,nvlsianpu/mbed,YarivCol/mbed-os,Archcady/mbed-os,mmorenobarm/mbed-os,catiedev/mbed-os,mikaleppanen/mbed-os,bulislaw/mbed-os,fahhem/mbed-os,pradeep-gr/mbed-os5-onsemi,adustm/mbed,infinnovation/mbed-os,tung7970/mbed-os-1,svastm/mbed,monkiineko/mbed-os,maximmbed/mbed,rgrover/mbed,geky/mbed,nvlsianpu/mbed,fahhem/mbed-os,andreaslarssonublox/mbed,fvincenzo/mbed-os,Archcady/mbed-os,cvtsi2sd/mbed-os,NXPmicro/mbed,RonEld/mbed,bcostm/mbed-os,betzw/mbed-os,tung7970/mbed-os,infinnovation/mbed-os,fvincenzo/mbed-os,nRFMesh/mbed-os,svastm/mbed,theotherjimmy/mbed,ryankurte/mbed-os,cvtsi2sd/mbed-os,fanghuaqi/mbed,rgrover/mbed,mikaleppanen/mbed-os,rgrover/mbed,cvtsi2sd/mbed-os,kjbracey-arm/mbed,mazimkhan/mbed-os,arostm/mbed-os,HeadsUpDisplayInc/mbed,nvlsianpu/mbed,maximmbed/mbed,nRFMesh/mbed-os,nvlsianpu/mbed,arostm/mbed-os,screamerbg/mbed,kl-cruz/mbed-os,bulislaw/mbed-os,andreaslarssonublox/mbed,jeremybrodt/mbed,mmorenobarm/mbed-os,YarivCol/mbed-os,fanghuaqi/mbed,adamgreen/mbed,theotherjimmy/mbed,jeremybrodt/mbed,andcor02/mbed-os,mmorenobarm/mbed-os,RonEld/mbed,adamgreen/mbed,mazimkhan/mbed-os,ryankurte/mbed-os,j-greffe/mbed-os,j-greffe/mbed-os,karsev/mbed-os,pradeep-gr/mbed-os5-onsemi,HeadsUpDisplayInc/mbed,mbedmicro/mbed,netzimme/mbed-os,monkiineko/mbed-os,j-greffe/mbed-os,fahhem/mbed-os,svastm/mbed,mmorenobarm/mbed-os,andcor02/mbed-os,CalSol/mbed,adustm/mbed,c1728p9/mbed-os,Archcady/mbed-os,andcor02/mbed-os,HeadsUpDisplayInc/mbed,adustm/mbed,mmorenobarm/mbed-os,mazimkhan/mbed-os,bcostm/mbed-os,fahhem/mbed-os,bcostm/mbed-os,fanghuaqi/mbed,adamgreen/mbed,betzw/mbed-os,NXPmicro/mbed,fahhem/mbed-os,svastm/mbed,YarivCol/mbed-os,fvincenzo/mbed-os,radhika-raghavendran/mbed-os5.1-onsemi,jeremybrodt/mbed,Archcady/mbed-os,cvtsi2sd/mbed-os,nRFMesh/mbed-os,andreaslarssonublox/mbed,svogl/mbed-os,nRFMesh/mbed-os,karsev/mbed-os,ryankurte/mbed-os,HeadsUpDisplayInc/mbed,screamerbg/mbed,mikaleppanen/mbed-os,c1728p9/mbed-os,svogl/mbed-os,mmorenobarm/mbed-os,NXPmicro/mbed,andcor02/mbed-os,betzw/mbed-os,radhika-raghavendran/mbed-os5.1-onsemi,NXPmicro/mbed,pradeep-gr/mbed-os5-onsemi,YarivCol/mbed-os,monkiineko/mbed-os,adustm/mbed,CalSol/mbed,mbedmicro/mbed,karsev/mbed-os,j-greffe/mbed-os,infinnovation/mbed-os,CalSol/mbed,bcostm/mbed-os,YarivCol/mbed-os,adustm/mbed,jeremybrodt/mbed,svogl/mbed-os,cvtsi2sd/mbed-os,fvincenzo/mbed-os,tung7970/mbed-os,mbedmicro/mbed,kjbracey-arm/mbed,betzw/mbed-os,theotherjimmy/mbed,HeadsUpDisplayInc/mbed,ryankurte/mbed-os,tung7970/mbed-os,svogl/mbed-os,kl-cruz/mbed-os,catiedev/mbed-os,RonEld/mbed,tung7970/mbed-os-1,netzimme/mbed-os,NXPmicro/mbed,bcostm/mbed-os,pradeep-gr/mbed-os5-onsemi,kjbracey-arm/mbed,andreaslarssonublox/mbed,Archcady/mbed-os,mbedmicro/mbed,arostm/mbed-os,fvincenzo/mbed-os,c1728p9/mbed-os,nvlsianpu/mbed,arostm/mbed-os,rgrover/mbed,rgrover/mbed,karsev/mbed-os,Archcady/mbed-os,kl-cruz/mbed-os,arostm/mbed-os,tung7970/mbed-os,NXPmicro/mbed,geky/mbed,c1728p9/mbed-os,catiedev/mbed-os,tung7970/mbed-os,screamerbg/mbed,monkiineko/mbed-os,geky/mbed,catiedev/mbed-os,kl-cruz/mbed-os,RonEld/mbed,arostm/mbed-os,tung7970/mbed-os-1,CalSol/mbed,screamerbg/mbed,svogl/mbed-os,RonEld/mbed,radhika-raghavendran/mbed-os5.1-onsemi,theotherjimmy/mbed,ryankurte/mbed-os,andcor02/mbed-os,CalSol/mbed,andcor02/mbed-os,radhika-raghavendran/mbed-os5.1-onsemi,mazimkhan/mbed-os,mikaleppanen/mbed-os,bulislaw/mbed-os,maximmbed/mbed,adamgreen/mbed,netzimme/mbed-os,pradeep-gr/mbed-os5-onsemi,kjbracey-arm/mbed,jeremybrodt/mbed,geky/mbed,CalSol/mbed,svastm/mbed,maximmbed/mbed,fahhem/mbed-os,mikaleppanen/mbed-os,YarivCol/mbed-os,tung7970/mbed-os-1,catiedev/mbed-os,fanghuaqi/mbed,nvlsianpu/mbed,adustm/mbed,RonEld/mbed,netzimme/mbed-os,c1728p9/mbed-os,netzimme/mbed-os,andreaslarssonublox/mbed,infinnovation/mbed-os