blob: 49b42a831203c47d6de3e80538f35abffde8b7eb (
plain) (
blame)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
#!/bin/bash -e
if [ -z "$1" ]; then
echo "Usage: $0 version-tag"
exit 1
fi
VERSION="$1"
REPO_URL="git://github.com/mpartel/bindfs.git"
umask 0022
# We work in a temporary dir to avoid interference
# of the autotools files in the parent dir.
OUTPUTDIR=`pwd`
TMPDIR="/tmp/bindfs-build"
rm -Rf $TMPDIR
mkdir $TMPDIR
pushd "$TMPDIR"
# Download the release source
git clone "$REPO_URL" "bindfs-$VERSION"
# Prepare the source tree:
# - check out the release tag
# - remove .git
# - run autotools
pushd "bindfs-$VERSION"
git checkout "$VERSION"
rm -Rf .git
./autogen.sh
rm -Rf autom4te.cache
popd
# Make the source package
tar cvzf "bindfs-${VERSION}.tar.gz" "bindfs-$VERSION"
# Get the change log and man-page
cp "bindfs-$VERSION/ChangeLog" ./bindfs-ChangeLog.txt
cp "bindfs-$VERSION/src/bindfs.1" ./bindfs.1
# Create the HTML man page
rman -f HTML -r "" bindfs.1 > bindfs.1.html
# Compile the source
pushd "bindfs-$VERSION"
./configure
make
popd
# Get the bindfs --help text
"bindfs-$VERSION/src/bindfs" --help > bindfs-help.txt
# Copy products to original dir
cp -r "bindfs-$VERSION.tar.gz" \
bindfs-ChangeLog.txt \
bindfs.1 \
bindfs.1.html \
bindfs-help.txt \
"$OUTPUTDIR/"
# Clean up and we're done
popd
rm -Rf $TMPDIR
echo
echo "DONE!"
echo
|