yipo
1/20/2014 - 8:12 PM

CB-VCS Adapter: version control with Git --> version control by appending date to filenames.

CB-VCS Adapter: version control with Git --> version control by appending date to filenames.

# 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)