Created
February 1, 2016 13:07
-
-
Save maxfi/7d3e1084a2558d026996 to your computer and use it in GitHub Desktop.
Migrate environment variables from one resin.io project to another project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Creates script output | |
# $1 = app to get ENVs from | |
# $2 = app to set ENVs to | |
resin envs --application $1 | tail -n +2 | sed 's/^[0-9]* //gm' | sed "s/ \+/ '/gm" | sed "s/$/'/m" | sed 's/^/resin env add /m' | sed "s/$/ --application $2/m" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment