File: 12_dpatch_with-cpp.sh

package info (click to toggle)
dpatch 2.0.38%2Bnmu1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 676 kB
  • sloc: sh: 1,013; makefile: 225; awk: 57; perl: 17
file content (39 lines) | stat: -rwxr-xr-x 696 bytes parent folder | download | duplicates (7)
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
#!/bin/bash
# Junichi Uekawa 16 Dec 2005

##: check --with-cpp functionality.

set -e

cd $PKGPATH

echo '=== change 00list'

cat > debian/patches/00list <<EOF
01_edpatch
#if defined(DEB_BUILD_ARCH)
02_another
#endif
#if defined(SOMETHING_NOT_DEFINED)
03_description
#endif
EOF

# equivalent of dpatch-list-patch
dpatch --with-cpp cat-all 

dpatch --with-cpp cat-all | grep debian/patches/01_edpatch.dpatch 
dpatch --with-cpp cat-all | grep debian/patches/02_another.dpatch
if dpatch --with-cpp cat-all | grep debian/patches/03_description.dpatch; then
    exit 1;
else
    true
fi

echo '=== put back 00list as it was'

cat > debian/patches/00list <<EOF
01_edpatch
02_another
03_description
EOF