Created
December 2, 2017 19:17
-
-
Save ilman/bce237a677c81e43e9b92e80d050e5be to your computer and use it in GitHub Desktop.
Pre-receive command for git
This file contains 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
#!/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