-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathdist.sh
More file actions
executable file
·36 lines (25 loc) · 798 Bytes
/
dist.sh
File metadata and controls
executable file
·36 lines (25 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh
ver=`cat ibsim/ibsim.c | sed -ne '/#define IBSIM_VERSION /s/^#define IBSIM_VERSION \"\(.*\)\"/\1/p'`
rel=1
distdir=ibsim-${ver}
tarball=${distdir}.tar.gz
test -z "$RELEASE" || rel=$RELEASE
dch_entry() {
cat <<EOF
ibsim ($ver) unstable; urgency=low
* New upstream release.
-- Tzafrir Cohen <nvidia@cohens.org.il> `date -R`
EOF
}
rm -f $tarball
rm -rf $distdir
mkdir $distdir
files=`find . -name '*.[ch]' -o -name Makefile -o -name '*.in'`
cp -a --parents $files debian \
defs.mk README COPYING TODO net-examples scripts tests $distdir
cat ibsim.spec.in \
| sed -e 's/@VERSION@/'$ver'/' -e 's/@RELEASE@/'$rel'/' -e 's/@TARBALL@/'$tarball'/' \
> $distdir/ibsim.spec
(dch_entry; cat debian/changelog) >$distdir/debian/changelog
tar czf $tarball $distdir
rm -rf $distdir