diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5633f31 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +getenv diff --git a/README.md b/README.md new file mode 100644 index 0000000..7f01f75 --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +## What's this? +`getenv` will fetch GCE metadata attributes and print them as K=V pairs ready to be `exported` as environment variables. + +Example: +```bash +./getenv +MY_VARIABLE=SOMEVALUE +``` + +#### How to use + +Export all metadata attributes as ENV variables for current shell session and store them in /etc/environment for future sessions: +```bash +export $(./getenv) +./getenv >> /etc/environment +``` +or +```bash +./getenv >> /etc/environment +source /etc/environment +``` \ No newline at end of file diff --git a/getenv b/getenv deleted file mode 100755 index 2376425..0000000 Binary files a/getenv and /dev/null differ