-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a script to generate mark2 "triggers.txt".
- Loading branch information
Showing
1 changed file
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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." | ||
|