Skip to content

Instantly share code, notes, and snippets.

@yeled
Created January 8, 2018 17:10
Show Gist options
  • Save yeled/4e75c022a9a7553a9bd52fa0f91d0675 to your computer and use it in GitHub Desktop.
Save yeled/4e75c022a9a7553a9bd52fa0f91d0675 to your computer and use it in GitHub Desktop.
make_patch.sh ./tmp/diffs/*
for i in $* ; do
SWITCH_DIFF=${i/tmp\/diffs\//}
SWITCH=${SWITCH_DIFF/.diff/}
echo "diff -r -u /dev/null ${SWITCH_DIFF}"
echo "--- /dev/null"
echo "+++ ${SWITCH} `date +%Y-%m-%d\ %H:%M:%S`.000000000 +0000"
cat <$i
echo
echo
done|source-highlight --failsafe -f esc --style-file=esc.style -s diff | less -cex4MRFX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment