Skip to content

Instantly share code, notes, and snippets.

@ilman
Created December 2, 2017 19:17
Show Gist options
  • Save ilman/bce237a677c81e43e9b92e80d050e5be to your computer and use it in GitHub Desktop.
Save ilman/bce237a677c81e43e9b92e80d050e5be to your computer and use it in GitHub Desktop.
Pre-receive command for git
#!/bin/bash
folder=($(basename ${PWD%/*/*}))
cdate=($(date +"%Y%m%d-%H%M%S"))
cd ../../../
zip -r "$folder"-"$cdate".zip $folder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment