Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 40 lines (30 sloc) 0.996 kb
47be081 Replacing arch specific make.conf files with patches for the fallback ma...
Marius Mauch authored
1 #!/bin/bash
2
3 die() {
4 echo "ERROR: $*" > /dev/stderr
5 patch -p0 make.conf < make.conf.diff
6 exit 1
7 }
8
9 if [ ! -f "make.conf" -o ! -f "make.conf.x86.diff" -o ! -d ".svn" ]; then
10 echo "ERROR: current directory is invalid" > /dev/stderr
11 exit 1
12 fi
13
14 svn diff make.conf > make.conf.diff
15 svn revert make.conf
16
17 for x in make.conf.*.diff; do
18 archs="$archs $(basename ${x:10} .diff)"
19 done
20
21
22 for arch in $archs; do
23 echo "* Patching $arch"
24 cp make.conf make.conf.$arch || die "copy failed"
25 patch -p0 make.conf.$arch < make.conf.${arch}.diff > /dev/null || die "arch-patch failed"
26 patch -p0 make.conf.$arch < make.conf.diff > /dev/null || die "patch failed"
27 done
28
29 echo "* Re-patching make.conf"
30 patch -p0 make.conf < make.conf.diff > /dev/null || die "repatch failed"
31
32 for arch in $archs; do
33 echo "* Creating diff for $arch"
34 diff -u make.conf make.conf.$arch > make.conf.${arch}.diff
35 [ -z "${KEEP_ARCH_MAKE_CONF}" ] && rm -f make.conf.$arch make.conf.${arch}.orig
36 done
37
38 rm make.conf.diff
39
40 echo "Done"
Something went wrong with that request. Please try again.