Linux legato-spm -environment variable $(LEGATO_ROOT) fails


#1

using the latest legato-spm 16-01
and

source ~/legato/packages/legato.sdk.latest/resources/configlegatoenv 

// command line build apps

mkapp -v -t wp85 -i $LEGATO_ROOT/interfaces/airVantage assetDataTutorial.adef
works

But

mkapp -v -t wp85 -i $(LEGATO_ROOT)/interfaces/airVantage assetDataTutorial.adef

// fails like this
WARNING:root:could not open file '/etc/apt/sources.list.d/devstudio.list'
LEGATO_ROOT: command not found
...

Any ideas?


#2

Hi John,

In Linux bash shell (and a couple of others actually), variables can be referenced either with $NAME or ${NAME}

The following syntax: $(command) actually calls the command and print the stdout.
e.g. $ export foo=$(echo bar) $ echo $foo bar

This explains the LEGATO_ROOT: command not found