If like me you do a lot of front-end coding and you have a lot of clients that asks you some little modifications, then you send the modifications back to them in a zip file while ignoring the .git folder and .gitignore file, then copy this zip into your dropbox and send it back to them. They find out a new bug so, rince and repeat… You get the picture. It can be quite tedious.

Well, i’ve made this two-lines script to automate this task :

zip -r homard homard -x homard/.git\*
cp ./homard.zip /Users/juliend2/Desktop/Dropbox/Public/projects/homard/homard.zip

So you modify and paste these two lines into a file named something like zipit.sh and you call it via sh zipit.sh .

What it does exactly is this :

  1. it looks for a folder named “homard” (french for lobster)
  2. it compresses this folder into a file named “homard.zip”, while ignoring the .git folder (that’s what the -x parameter is for) (will also ignore the .gitignore file)
  3. copy this zip file into a Dropbox subfolder.

That’s it!