File: prepare-work

package info (click to toggle)
ida 2.01-1.2
  • links: PTS
  • area: contrib
  • in suites: sarge
  • size: 236 kB
  • ctags: 8
  • sloc: makefile: 64; sh: 28
file content (36 lines) | stat: -rw-r--r-- 513 bytes parent folder | download | duplicates (10)
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
#!/bin/bash
set -e
dist="$(pwd)/dist"
mkdir work.tmp
cd work.tmp

# unpack tarballs
for tarball in $dist/*.tar*; do
	echo "### untar $tarball"
	case $tarball in
		*.tar.gz)
			tar xzf $tarball
			;;
		*.tar.bz2)
			tar xjf $tarball
			;;
		*)
			echo "Huh? ${tarball}?"
			exit 1
			;;
	esac
done

# apply patches
cd *
for patch in $dist/*.diff; do
	test -f "$patch" || continue
	name="$(basename $patch .diff)"
	echo "### apply $name"
	patch -p1 -b -z ".$name" < $patch
done

# commit
cd ../..
mv work.tmp work