File: modsecurity-merge.sh

package info (click to toggle)
modsecurity 3.0.14-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 88,920 kB
  • sloc: ansic: 174,512; sh: 43,569; cpp: 26,214; python: 15,734; makefile: 3,864; yacc: 2,947; lex: 1,359; perl: 1,243; php: 42; tcl: 4
file content (79 lines) | stat: -rwxr-xr-x 1,414 bytes parent folder | download | duplicates (4)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#!/bin/bash

#
# Sync ModSecurity / libinjection
#

# explode on error
set -e

#
# CLONE LIBINJECTION
#
if [ ! -d libinjection ]; then
    git clone https://github.com/client9/libinjection.git
else
    (cd libinjection; git pull)
fi

pwd

#
# CLONE MODSECURITY
#
if [ ! -d ModSecurity ]; then
    git clone https://github.com/client9/ModSecurity.git
else
    ( cd ModSecurity; git pull )
fi
pwd

#
# Use right branch
#
(cd ModSecurity; git checkout remotes/trunk )

pwd

#
# COPY IN NEW LIBINJECTION
#
cp libinjection/COPYING.txt ModSecurity/apache2/
cp libinjection/c/libinjection.h ModSecurity/apache2/libinjection
cp libinjection/c/libinjection_sqli.c ModSecurity/apache2/libinjection
cp libinjection/c/libinjection_sqli.h ModSecurity/apache2/libinjection
cp libinjection/c/libinjection_sqli_data.h ModSecurity/apache2/libinjection


#
# REGENERATE / BUILD
#
cd ModSecurity
./autogen.sh
./configure
make
make distclean

#
# ADD NEW BITS
#
git add apache2/libinjection/COPYING.txt
git add apache2/libinjection/libinjection.h
git add apache2/libinjection/libinjection_sqli.h
git add apache2/libinjection/libinjection_sqli.c
git add apache2/libinjection/libinjection_sqli_data.h

# this file seems to get modified, reset just to be safe
git checkout standalone/Makefile.in

git commit -m 'libinjection sync'

#
# PUSH TO SPECIAL BRANCH
#
echo "pushing to remotes/trunk"
git push origin remotes/trunk

#
# PROFIT
#