Skip to content

Instantly share code, notes, and snippets.

@allquixotic
Created February 16, 2013 00:14
Show Gist options
  • Save allquixotic/4964713 to your computer and use it in GitHub Desktop.
Save allquixotic/4964713 to your computer and use it in GitHub Desktop.
#!/bin/bash
directory=$(pwd)
pattern=$(awk -vORS=" " -v q="'" '{ print q $1 q }' .gitignore | sed 's/,$/\n/')
echo zip -r ignored $directory -i $pattern
zip -r ignored $directory -i $pattern
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment