Skip to content

Commit

Permalink
Added a script to generate mark2 "triggers.txt".
Browse files Browse the repository at this point in the history
  • Loading branch information
totemo committed Jun 30, 2018
1 parent c69bf75 commit 1773c9d
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions mark2/gentriggers.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
rm -f triggers.new
for NAME in {0..9} {a..z} {A..Z}; do
LOWER=$(echo "${NAME}" | tr [:upper:] [:lower:])
if [ "$LOWER" == "$NAME" ]; then
ID="${LOWER}"
else
# Capital letter name. Function names must be all lower case and
# objective IDs are case insensitive, so for IDs use a_ for A.
ID="${LOWER}_"
fi
echo -n "$NAME ($ID) "

cat >> "triggers.new" <<EOF
!delwp${NAME},function waypoints:delwp${ID}-command
!setwp${NAME},function waypoints:setwp${ID}-command
!wp${NAME},function waypoints:wp${ID}-command
EOF

done

echo
echo
echo "Wrote ./triggers.new. Append to triggers.txt and ~reload mark2."

0 comments on commit 1773c9d

Please sign in to comment.