File: sample.00template

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 (24 lines) | stat: -rw-r--r-- 661 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
# Sample debian/patches/00template script
# era Thu May 15 23:24:07 2003

# This simply creates the equivalent of the hard-coded template.
# Adapt and hack to suit your needs.

file="$1"
shift
description="$@"

fullnameguess="$(getent passwd $(id -un) | cut -f5 -d: | cut -f1 -d,)"
domainguess=$([ -f /etc/mailname ] && cat /etc/mailname || hostname -f)
emailguess="${DEBEMAIL:-${EMAIL:-$(logname)@${domainguess}}}"

cat <<EOF
#! /bin/sh /usr/share/dpatch/dpatch-run
## ${file} by ${DEBFULLNAME:-$fullnameguess} <$emailguess>
##
## All lines beginning with \`## DP:' are a description of the patch.
## DP: ${description:-No description}

@DPATCH@
EOF