Browse Source

rewrite tarball script as a makefile target

remotes/karagrat/master
Romain Goffe 13 years ago
parent
commit
4bbfdc470b
  1. 15
      makefile
  2. 28
      utils/release.sh
  3. 31
      utils/tarball.sh

15
makefile

@ -24,6 +24,8 @@ PDF = $(TARGETS:%=%.pdf)
CHORDS = chords.tex
CHORDS_SRC = $(shell ls songs/*/*.sg)
DATE = $(shell date +%d)-$(shell date +%m)-$(shell date +%Y)
PRINT=printf "%s\n"
PRINTTAB=printf "\t%s\n"
@ -58,7 +60,6 @@ clean:
$(TARGETS:%=%.toc) $(TARGETS:%=%.out) $(TARGETS:%=%.log) \
$(TARGETS:%=%.nav) $(TARGETS:%=%.snm)
@rm -f *.sbx *.sxd *.sxc
@rm -f lilypond/*.ps
@rm -f *.pyc
cleanall: clean
@ -90,6 +91,18 @@ $(PDF): %.pdf: %.tex %.aux
$(CHORDS): $(CHORDS_SRC)
$(MAKE_CHORDS) -o $@
archive: clean
tar -czvf songbook-$(DATE).tar.gz \
--exclude=*pdf \
--exclude=.git --exclude=.gitignore \
--exclude=$(BOOKS_DIR)/default.sb \
--exclude=perso/* --exclude=perso \
--exclude=build/* --exclude=build \
--exclude=covers/* --exclude=covers \
--exclude=data/* --exclude=data \
--exclude=*tar.gz \
../songbook
ifeq (.pdf,$(suffix $(MAKECMDGOALS)))
include $(MAKECMDGOALS:%.pdf=%.d)
else ifneq ($(MAKECMDGOALS),clean)

28
utils/release.sh

@ -54,21 +54,17 @@ fi;
#build all songbooks
rm -f *.d
make cleanall
make naheulbeuk.pdf
make volume-1.pdf
make volume-2.pdf
make volume-3.pdf
make volume-4.pdf
make volume-5.pdf
make english.pdf
make french.pdf
make songbook.pdf
make lyricbook.pdf
#clean
make clean
./utils/tarball.sh
make -j 4 naheulbeuk.pdf
make -j 4 volume-1.pdf
make -j 4 volume-2.pdf
make -j 4 volume-3.pdf
make -j 4 volume-4.pdf
make -j 4 volume-5.pdf
make -j 4 english.pdf
make -j 4 french.pdf
make -j 4 songbook.pdf
make -j 4 lyricbook.pdf
make -j 4 archive
git status
@ -77,7 +73,7 @@ then
./utils/new-songs-list.sh | cat - NEWS > /tmp/out && mv -f /tmp/out NEWS
echo "\nversion $MAIN.$MAJOR.$MINOR\n" | cat - NEWS > /tmp/out && mv -f /tmp/out NEWS
git add templates/*.tmpl
git add books/volume-5.sb NEWS
git add books/*.sb NEWS
git commit -m "patacrep release version $MAIN.$MAJOR.$MINOR"
git tag "patacrep_$MAIN.$MAJOR.$MINOR"
fi

31
utils/tarball.sh

@ -1,31 +0,0 @@
#!/bin/sh
#Author: Romain Goffe
#Date: 13/10/2011
#Description: Build a tarball from the songbook git repo
#Copy songbook directory
cd $HOME
cp -RH songbook songbook-$(date +%d)-$(date +%m)-$(date +%Y);
#Remove unecessary directories
cd songbook-$(date +%d)-$(date +%m)-$(date +%Y);
rm -rf perso/ ;
rm -rf build/ ;
rm -rf data/ ;
rm -rf .git/ ;
rm -f .gitignore ;
rm -f utils/send.sh ;
rm -f books/tmp.sb books/default.sb
rm -f default*
#Clean tmp files
find . -name "*~" -or -name "#*#" -type f -exec rm -f {} \;
make cleanall
#Tarball
cd $HOME
tar czvf songbook.tar.gz songbook-$(date +%d)-$(date +%m)-$(date +%Y)
#Remove copy
rm -rf songbook-$(date +%d)-$(date +%m)-$(date +%Y)/
Loading…
Cancel
Save