mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Improve tarball script.
This commit is contained in:
parent
c897efb08a
commit
e2361d6e56
19
mktarball.sh
19
mktarball.sh
@ -1,19 +1,22 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
#script to create a source tarball for YACReader distribution and packaging
|
#Script to create a source tarball for YACReader distribution and packaging
|
||||||
|
#This should be run from YACReaders top source directory
|
||||||
|
|
||||||
YACVERSION=7.2.0
|
YACVERSION=7.2.0
|
||||||
if [ -f Makefile ]
|
if [ -f Makefile ]
|
||||||
then
|
then
|
||||||
make distclean
|
make distclean
|
||||||
fi
|
fi
|
||||||
if [ ! -f "yacreader_${YACVERSION}-src.tar.xz" ]
|
if [ ! -f "yacreader-${YACVERSION}-src.tar.xz" ]
|
||||||
then
|
then
|
||||||
echo "Building source tarball"
|
echo "Building source tarball"
|
||||||
else
|
else
|
||||||
echo "Updating source tarball"
|
echo "Updating source tarball"
|
||||||
rm yacreader_${YACVERSION}-src.tar* #delete old tarball, since tar can't update compressed archives
|
rm yacreader-${YACVERSION}-src.tar* #delete old tarball, since tar can't update compressed archives
|
||||||
fi
|
fi
|
||||||
#use --exclude to make sure we get a pristine tar
|
#Use tar's --exclude feature to make sure we get a pristine tar for distribution.
|
||||||
#might not work out of the box with bsdtar!
|
#Exclude all version control system related files and rename the top directory in the tarball using --transform.
|
||||||
tar cfJ yacreader_${YACVERSION}-src.tar.xz --exclude '*.rej' --exclude '*.orig' --exclude '*.gch' --exclude 'dependencies' \
|
tar cfJ yacreader-${YACVERSION}-src.tar.xz --exclude '*.rej' --exclude '*.orig' --exclude '*.gch' --exclude 'dependencies' --exclude '*.o' \
|
||||||
--exclude 'yacreader*tar*' --exclude '.hg*' --exclude 'libp7zip' --exclude 'lib7zip' ./* --transform s/./yacreader_${YACVERSION}/
|
--exclude 'yacreader*tar*' --exclude '.hg*' --exclude 'lib7zip' --exclude 'libp7zip' --exclude-vcs ./* --transform s/./yacreader-${YACVERSION}/
|
||||||
md5sum yacreader_${YACVERSION}-src.tar.xz > yacreader_${YACVERSION}-src.tar.xz.md5sum
|
#Calculate checksum to enable packagers to verify whether they are using the original tarball.
|
||||||
|
md5sum yacreader-${YACVERSION}-src.tar.xz > yacreader-${YACVERSION}-src.tar.xz.md5sum
|
Loading…
x
Reference in New Issue
Block a user