Rev 5 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
#!/bin/sh## 01_line-endings.dpatch by Magnus Holmgren <magnus@kibibyte.se>#### All lines beginning with `## DP:' are a description of the patch.## DP: Convert CRLF line endings to LF in certain Windows-related filesFILES_WITH_CRLF="src/libspf2/spf_dns_windns.csrc/libspf2/spf_win32.csrc/libreplace/win32_config.hsrc/include/spf_dns_windns.hsrc/include/spf_win32.h"set -edpatch_patch() {# Change line endings to LF in files with CRLFsed -ri -e 's/\r$//' $FILES_WITH_CRLF}dpatch_unpatch() {# Change line endings back to CRLF in files that had it in the tarball# Unfortunately there are exceptions ... have to watch out for changes# in future upstream versions (or simply make backups instead).sed -ri -e '/\r$|^#pragma comment/!s/$/\r/' $FILES_WITH_CRLFsed -ri -e '$s/\r$//' src/libspf2/spf_dns_windns.c}DPATCH_LIB_NO_DEFAULT=1. /usr/share/dpatch/dpatch.lib.sh