00template
来自「hylafax-4.4.4.tar.gz fax relative sourc」· 代码 · 共 43 行
TXT
43 行
#!/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"shiftdescription="$@"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 -e## ${file} by ${DEBFULLNAME:-$fullnameguess} <$emailguess>#### All lines beginning with \`## DP:' are a description of the patch.## DP: ${description:-No description}if [ \$# -lt 1 ]; then echo >&2 "\`basename \$0\`: script expects -patch|-unpatch as argument" exit 1fi[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-optspatch_opts="\${patch_opts:--f --no-backup-if-mismatch} \${2:+-d \$2}"case "\$1" in -patch) patch \$patch_opts -p1 < \$0;; -unpatch) patch \$patch_opts -p1 -R < \$0;; *) echo >&2 "\`basename \$0\`: script expects -patch|-unpatch as argument" exit 1;;esacexit 0#@DPATCH@#EOF
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?