2
## 02_branding.dpatch by Adam Conrad <adconrad@0c3.net>
4
## All lines beginning with `## DP:' are a description of the patch.
5
## DP: Changes apache's PLATFORM based on lsb_release output
7
BUILD_DIST="($(lsb_release -i -s))"
10
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
16
if grep -q "${BUILD_DIST}" server/core.c 2>/dev/null; then
17
echo >&2 "`basename $0`: patch already applied"
20
# This is where we get our distribution-specific server signature from:
21
sed -i -e "s/(\" PLATFORM \")/${BUILD_DIST}/" server/core.c
25
if grep -q "${BUILD_DIST}" server/core.c 2>/dev/null; then
26
sed -i -e "s/${BUILD_DIST}/(\" PLATFORM \")/" server/core.c
28
echo >&2 "`basename $0`: patch not yet applied, cannot unpatch"
33
echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"