File: source.unpack

package info (click to toggle)
metacity 2.3.89-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 596 kB
  • ctags: 16
  • sloc: sh: 282; makefile: 205
file content (32 lines) | stat: -rw-r--r-- 852 bytes parent folder | download | duplicates (92)
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
make -C debian/scripts sh.vars
. debian/scripts/sh.vars
. debian/scripts/lib

mkdir -p $STAMP_DIR/upstream/tarballs/ $SOURCE_DIR
if [ ! -z "$SRC_TAR_DIR" -a -d "$SRC_TAR_DIR" ];then
	files=$(find $SRC_TAR_DIR -type f|sort)
else
	VER=$(dpkg-parsechangelog 2>&1|egrep ^Version|cut -d " " -f 2|cut -d "-" -f 1)
	SRC=$(dpkg-parsechangelog 2>&1|egrep ^Source|cut -d " " -f 2-)
	files=../${SRC}_${VER}.orig.tar.gz
fi
for f in $files;do
	stampfile=$STAMP_DIR/upstream/tarballs/`basename $f`
	if [ ! -e $stampfile ];then
		START $f
		if extract_tar ${SOURCE_DIR:-.} $f > $stampfile.log;then
			if [ x$SOURCE_DIR = x ];then
				mkdir -p $STAMP_DIR/upstream/files/tarballs
				cp $stampfile.log $STAMP_DIR/upstream/files/tarballs/`basename $f`.list
			fi
			OK $f
			touch $stampfile
		else
			FAILED $f
			exit 1
		fi
	else
		ALREADY_DONE $f
	fi
done