File: 06_dpatch_edit_patch_description.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 (30 lines) | stat: -rwxr-xr-x 802 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
#!/bin/bash
# Junichi Uekawa 21 June 2005.

##: check to see if '-d' command-line option works at all.
##: This didn't work in 2.0.13, since 'dpatch_template_hardcoded' doesn't call 'dpatch' with the description.

set -e

cd $PKGPATH

#make sure it's unpatched
debian/rules unpatch
echo 'echo Modification > desc ' | \
    dpatch-edit-patch -d 'Description of this patch' 03_description
echo 03_description >> debian/patches/00list
debian/rules patch

echo '=== check file contains the right content'
[ `cat desc` = Modification ]
debian/rules unpatch

echo '=== check file does not exist'
[ ! -f desc ]

echo '=== check the description'
grep 'Description of this patch' debian/patches/03_description.dpatch

echo '=== check the filename'
grep '^##.*\.dpatch by ' debian/patches/03_description.dpatch