mirror of
https://github.com/linux-speakup/espeakup.git
synced 2026-08-20 14:54:17 +02:00
created tarball script
This commit adds a script to create a tarball from the repository and removes this functionality from the makefile.
This commit is contained in:
parent
9ee3fd433c
commit
4e7ae23757
2 changed files with 18 additions and 14 deletions
14
Makefile
14
Makefile
|
|
@ -17,15 +17,6 @@ PREFIX = /usr
|
|||
MANDIR = $(PREFIX)/share/man/man8
|
||||
BINDIR = $(PREFIX)/bin
|
||||
|
||||
ifeq ("$(origin TAG)", "command line")
|
||||
TIMESTAMP := _p$(shell date +%Y%m%d)
|
||||
endif
|
||||
|
||||
VERSION := $(shell ./version)
|
||||
TAG := v$(VERSION)
|
||||
TARPREFIX := espeakup-$(VERSION)
|
||||
TARFILE := $(TARPREFIX)$(TIMESTAMP).tar
|
||||
|
||||
all: espeakup
|
||||
|
||||
install: espeakup
|
||||
|
|
@ -42,11 +33,6 @@ distclean: clean
|
|||
|
||||
espeakup: $(OBJS)
|
||||
|
||||
tarball:
|
||||
git archive --format=tar --prefix=$(TARPREFIX)/ $(TAG) > $(TARFILE)
|
||||
tar f $(TARFILE) --delete $(TARPREFIX)/.gitignore
|
||||
bzip2 $(TARFILE)
|
||||
|
||||
cli.o: cli.c espeakup.h
|
||||
|
||||
espeakup.o: espeakup.c espeakup.h
|
||||
|
|
|
|||
18
tarball
Executable file
18
tarball
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
# Makes a tarball release
|
||||
|
||||
VER=$(./version)
|
||||
PREFIX=espeakup-${VER}
|
||||
REL=${1:-v${VER}}
|
||||
|
||||
if [ "$REL" != "v${VER}" ]; then
|
||||
TIMESTAMP=`git show $REL --pretty=format:%ai |head -1`
|
||||
PATCHLEVEL=`date --utc -d "$TIMESTAMP" +_p%Y%m%d%H%M`
|
||||
fi
|
||||
|
||||
TARFILE=${PREFIX}${PATCHLEVEL}.tar
|
||||
|
||||
git archive --format=tar --prefix=${PREFIX}/ $REL > ${TARFILE}
|
||||
tar f ${TARFILE} --delete ${PREFIX}/.gitignore --delete ${PREFIX}/tarball
|
||||
bzip2 ${TARFILE}
|
||||
echo "Produced ${TARFILE}.bz2"
|
||||
Loading…
Add table
Add a link
Reference in a new issue