diff options
Diffstat (limited to 'conv')
-rwxr-xr-x | conv | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -0,0 +1,28 @@ +#!/bin/sh + +# conv -- convert git diff -p output to pkgsrc patch + +IFS=' +' + +echo '$NetBSD' +echo +sed ' + /^diff/d; + /^index/d; + s/^--- .*/&/; +' | +while read line; do + case "$line" in + diff*) ;; + index*) ;; + '--- a/'*) + file=${line#--- a/} + echo -n "--- $file.orig " + echo "$(stat -x "$file")" | sed -n 's/^Access: //p' ;; + '+++ b/'*) + echo "+++ ${line#+++ b/}" ;; + *) + echo "$line" ;; + esac +done |