Skip to content

Instantly share code, notes, and snippets.

@exophunk
Created October 26, 2017 08:49
Show Gist options
  • Select an option

  • Save exophunk/e986751c170f6f7c1715f288670b5f5d to your computer and use it in GitHub Desktop.

Select an option

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
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