Created
January 20, 2014 20:12
-
-
Save yipo/8528109 to your computer and use it in GitHub Desktop.
CB-VCS Adapter: version control with Git --> version control by appending date to filenames.
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
# Chang-Biau Version Control System Adapter v1.0 | |
# Author: Yi-Pu Guo (YiPo) | |
# License: MIT | |
FILE = thesis/thesis_guoyp.tex | |
# fill your own filename above. | |
fp = $(basename $(FILE)) | |
fs = $(suffix $(FILE)) | |
revisions = \ | |
$(addprefix $(fp), \ | |
$(addsuffix $(fs), \ | |
$(shell git tag))) | |
cb-vcs: $(revisions) | |
-rm $(FILE) | |
$(fp)%$(fs): | |
git cat-file blob $*:$(FILE) > $@ | |
clean: | |
-rm $(fp)?*$(fs) | |
git checkout $(FILE) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment