File: source.unpack

package info (click to toggle)
xfree86-2 3.3.6-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 14,804 kB
  • ctags: 2
  • sloc: sh: 890; makefile: 63
file content (24 lines) | stat: -rw-r--r-- 607 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
. debian/scripts/vars
mkdir -p $STAMP_DIR/upstream/archives/ $SOURCE_DIR
for f in $(find upstream/archives -type f | sort); do
	stampfile=$STAMP_DIR/upstream/archives/$(basename $f)
	if [ ! -e $stampfile ];then
		case $f in
			*.gz|*.tgz)         cmd=zcat;;
			*.bz)         cmd=bzcat;;
			*.bz2)        cmd=bz2cat;;
			*)            cmd=cat;;
		esac
		echo -n "Extracting upstream archive $f..."
		if $cmd $f | (cd $SOURCE_DIR;tar xv) > $stampfile.log;then
			echo "done."
			touch $stampfile
		else
			echo "failed!"
			exit 1
		fi
	else
		echo "upstream archive $f already extracted!"
	fi
done