Skip to content

Instantly share code, notes, and snippets.

@DavidGriffith
Created April 18, 2016 04:26
Show Gist options
  • Save DavidGriffith/853982aae434807fed56479a7d5e7a6a to your computer and use it in GitHub Desktop.
Save DavidGriffith/853982aae434807fed56479a7d5e7a6a to your computer and use it in GitHub Desktop.
#!/bin/sh
# This script changes instances of <actor, Action> to <Action, actor> so
# that the current Inform6 compiler can compile test programs using the
# Inform6 Library between commits
# 9abf2dd82318ad5406ee2f171462e8c7ed596e5b and
# 5426af94aa57ade55ba7928f4eed6e47b314f0ca inclusive.
# To reverse this, just do "git checkout -f verblibm.h"
FILE=verblibm.h
if [ ! -e $FILE ] ; then
echo "Not in the inform6lib work directory, I see..."
fi
sed -i 's/<\(actor\)\, \([A-Z_a-z][A-Z_a-z]*\)>/<\2\, \1>/g' verblibm.h
sed -i 's/<\(actor\)\, \([A-Z_a-z][A-Z_a-z]* [A-Z_a-z][A-Z_a-z]*\)>/<\2, \1>/g' verblibm.h
sed -i 's/<\(actor\)\, \([A-Z_a-z][A-Z_a-z]* [A-Z_a-z][A-Z_a-z]* [A-Z_a-z][A-Z_a-z]*\)>/<\2, \1>/g' verblibm.h
sed -i 's/lm_s = x2;$//g' verblibm.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment