blob: 5935cc91c50ee09ad5576b45c5ac5309870d201f (
plain)
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
|
#!/bin/sh
set -e
if ! [ -d debian/prune ]; then
exit 0
fi
if [ "x$1" != x--upstream-version ]; then
exit 1
fi
version="$2"
filename="$3"
if [ -z "$version" ] || ! [ -f "$filename" ]; then
exit 1
fi
dir="$(pwd)"
tempdir="$(mktemp -d)"
cd "$tempdir"
tar xf "$dir/$filename"
cat "$dir"/debian/prune/* | while read file; do rm -f */$file; done
tar czf "$dir/$filename" *
cd "$dir"
rm -rf "$tempdir"
echo "Done pruning upstream tarball"
exit 0
|