mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 20:13:32 +01:00
12 lines
358 B
Makefile
12 lines
358 B
Makefile
BACKUP_SOURCE ?= .
|
|
BACKUP_TARGET ?= ..
|
|
BACKUP_DATE ?= $(shell date +'%y%m%d-%H%M%S')
|
|
|
|
_BACKUP_SOURCE = $(notdir $(shell cd $(BACKUP_SOURCE); pwd))
|
|
|
|
backup: distclean
|
|
tar -C .. $(_BACKUP_SOURCE) -cjf $(BACKUP_TARGET)/$(_BACKUP_SOURCE)-$(BACKUP_DATE).tar.bz2
|
|
|
|
purge-last-backup:
|
|
$(RM) -f $(shell ls $(BACKUP_TARGET)/$(_BACKUP_SOURCE)-*.tar.bz2 | tail -1)
|
|
|