Skip to content

Commit

Permalink
Add simple API diffing tool
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
jakubfijalkowski committed Aug 8, 2020
1 parent 14cb576 commit 1cdc47b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tools/diff.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env zsh
set -euo pipefail
setopt extended_glob

pushd "${0:A:h}/.." >/dev/null

diff -y \
<(cat Bindings/Libsass/**.hs | grep -E 'foreign import .+ (libsass|sass)_' | sed -E 's/^.+ (libsass|sass)_(.+)$/\1_\2/gm' | tr -d '"' | sort) \
<(cat libsass/include/sass.h libsass/include/sass/*.h | grep -E 'ADDAPI .+ ADDCALL (sass|libsass).+ ?\(' | sed -E 's/^.+ (libsass|sass)_(.+?) ?\(.+$/\1_\2/gm' | awk '{$1=$1};1' | sort)

popd >/dev/null

0 comments on commit 1cdc47b

Please sign in to comment.