|Linux, FreeBSD, Juniper, Cisco / Network security articles and troubleshooting guides
|How to use $variable in conditional sentences?
|Page 1 of 1|
|Author:||icvallejo [ Wed May 17, 2017 4:01 am ]|
|Post subject:||How to use $variable in conditional sentences?|
I am doing a Makefile but I can't return the value of $var to use it in conditional sentences:
GOPATH=$(GO) env GOPATH
@if [ ! -d "$(GOPATH)/bin" ]; then mkdir -p "$(GOPATH)/bin" ; fi
When I type "make", @$GOPATH returns
/home/icvallejo/goso it's ok, but after, I don't know how to use it (I can't do it) with 'if' condition, make returns this:
if [ ! -d " go env GOPATH/bin" ] ; then mkdir -p " go env GOPATH/bin" ; fi
Can you help me please?
|Page 1 of 1||All times are UTC - 5 hours [ DST ]|
|Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group