Mercurial > hg > config
annotate bin/example/indirect.sh @ 845:70ae14b6be51
[sync] ~/k0s is no longer in PATH as it corrupts PYTHONPATH
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Thu, 17 Aug 2017 09:48:49 -0700 |
parents | c7309e7625ba |
children |
rev | line source |
---|---|
693
c7309e7625ba
add indrect referencing example
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
1 #!/bin/bash |
c7309e7625ba
add indrect referencing example
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
2 |
c7309e7625ba
add indrect referencing example
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
3 NAME=foo |
c7309e7625ba
add indrect referencing example
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
4 PASSWORD=bar |
c7309e7625ba
add indrect referencing example
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
5 IP_ID=91 |
c7309e7625ba
add indrect referencing example
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
6 ENV=prod |
c7309e7625ba
add indrect referencing example
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
7 |
c7309e7625ba
add indrect referencing example
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
8 for i in NAME PASSWORD IP_ID ENV |
c7309e7625ba
add indrect referencing example
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
9 do |
c7309e7625ba
add indrect referencing example
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
10 echo "export $i=\"$(eval echo \$$i)\"" |
c7309e7625ba
add indrect referencing example
Jeff Hammel <k0scist@gmail.com>
parents:
diff
changeset
|
11 done |