~ubuntu-branches/ubuntu/lucid/xserver-xorg-video-dummy/lucid

« back to all changes in this revision

Viewing changes to debian/xsfbs/repack.sh

  • Committer: Bazaar Package Importer
  • Author(s): Julien Cristau
  • Date: 2009-04-11 11:03:45 UTC
  • mfrom: (4.2.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090411110345-3rpa1fwnuqxwa7h9
Tags: 1:0.3.1-2
Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
set -e
 
4
 
 
5
if ! [ -d debian/prune ]; then
 
6
        exit 0
 
7
fi
 
8
 
 
9
if [ "x$1" != x--upstream-version ]; then
 
10
        exit 1
 
11
fi
 
12
 
 
13
version="$2"
 
14
filename="$3"
 
15
 
 
16
if [ -z "$version" ] || ! [ -f "$filename" ]; then
 
17
        exit 1
 
18
fi
 
19
 
 
20
dir="$(pwd)"
 
21
tempdir="$(mktemp -d)"
 
22
 
 
23
cd "$tempdir"
 
24
tar xf "$dir/$filename"
 
25
cat "$dir"/debian/prune/* | while read file; do rm -f */$file; done
 
26
 
 
27
tar czf "$dir/$filename" *
 
28
cd "$dir"
 
29
rm -rf "$tempdir"
 
30
echo "Done pruning upstream tarball"
 
31
 
 
32
exit 0