blob: d3f8a27e67bb8e36eeccf2f64d6109ad785596ff [file] [log] [blame]
John Stultzaccad872017-07-06 13:56:07 -07001#!/bin/sh
2#
3# Convert one or more git patches that have had it's CR:s stripped out by SMTP
4# into something th
5
6if [ $# -lt 1 ]; then
7 echo "usage: `basename $0` <filename>" >&2
8 exit 1
9fi
10
11convert_file()
12{
13 sed -i "s/$/\r/g" "$1"
14 sed -i "s:^\(---\|+++ \)\(.*\)\r$:\1\2:g" "$1"
15}
16
17while [ $# -gt 0 ]; do
18 convert_file "$1"
19 shift
20done