diff options
Diffstat (limited to 'linden/scripts/linux/0-patch-SL-source')
-rwxr-xr-x | linden/scripts/linux/0-patch-SL-source | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/linden/scripts/linux/0-patch-SL-source b/linden/scripts/linux/0-patch-SL-source new file mode 100755 index 0000000..4885d5d --- /dev/null +++ b/linden/scripts/linux/0-patch-SL-source | |||
@@ -0,0 +1,31 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | # Check for patches to apply. The names of the patches must be in the form | ||
4 | # slviewer-*.patch* (Example: slviewer-v117-EmbbededNotecard.patch.bz2). | ||
5 | # They must be applicable from inside the source directory with the -p1 | ||
6 | # option, i.e. they have been built from outside the source directory | ||
7 | # with a diff command such as: | ||
8 | # diff -urN linden/ linden-patched/ >slviewer-whatever.patch | ||
9 | # And they may be gzipped or bzipped. | ||
10 | |||
11 | source config-SL-source | ||
12 | |||
13 | PATCHES=`/bin/ls $PATH_TO_PATCHES/$1/slviewer-*.patch* 2>/dev/null` | ||
14 | PATCHES="$PATCHES `/bin/ls $PATH_TO_PATCHES/$1/slviewer-*.diff* 2>/dev/null`" | ||
15 | if [ "$PATCHES" != "" ] ; then | ||
16 | echo "Applying patches..." | ||
17 | cd $PATH_TO_SOURCES | ||
18 | for i in $PATCHES; do | ||
19 | echo "Patch: $i" | ||
20 | if echo $i | grep ".gz" &>/dev/null ; then | ||
21 | gunzip -c $i | patch -p1 -s | ||
22 | elif echo $i | grep ".bz2" &>/dev/null ; then | ||
23 | bzcat $i | patch -p1 -s | ||
24 | elif echo $i | grep ".zip" &>/dev/null ; then | ||
25 | unzip -o $i >/dev/null | ||
26 | else | ||
27 | patch -p1 -s <$i | ||
28 | fi | ||
29 | done | ||
30 | fi | ||
31 | |||