Created
January 14, 2016 18:10
-
-
Save Data-ptr/cfe2f512945709a96b93 to your computer and use it in GitHub Desktop.
Just authenticated to a Heroku login and want to quickly clone all the applications into their own directories? In a "one-liner?" Remember, you have to be authenticated, `$ heroku apps` should list the applications.
This file contains hidden or 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
| for HEROKU_APP in $(heroku apps | tail -n+2); do export REPO_DIR="heroku-${HEROKU_APP}"; if [ ! -d "$REPO_DIR" ]; then mkdir "$REPO_DIR"; cd "$REPO_DIR"; heroku git:clone ./ -a "${HEROKU_APP}"; cd ..; fi done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment