Created
October 26, 2017 08:49
-
-
Save exophunk/e986751c170f6f7c1715f288670b5f5d to your computer and use it in GitHub Desktop.
Copies credential files that aren't in a repo from all projects in a folder to a zipfile
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
| input_folder='/Users/exophunk/workspace/y7k' | |
| output_folder='/Users/exophunk/Desktop/credentialzips' | |
| for dir in "$input_folder"/*/ | |
| do | |
| dirname=$(basename $dir) | |
| if [ $dirname != 'ARCHIVE' ]; then | |
| f1="${dir}.env" | |
| f2="${dir}.y7k-cli.yml" | |
| f3="${dir}.gitignore" | |
| zip -j0 "${output_folder}/${dirname}.zip" $f1 $f2 $f3 | |
| fi | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment