Match outboard filename without board revision

This commit is contained in:
Manna Harbour 2024-05-01 13:52:24 +10:00
parent f6c0f70b57
commit cb9c43171e
2 changed files with 3 additions and 3 deletions

View File

@ -92,13 +92,13 @@ jobs:
fi fi
echo "shield_arg=$SHIELD_ARG" >> $GITHUB_OUTPUT echo "shield_arg=$SHIELD_ARG" >> $GITHUB_OUTPUT
keyboard_split="$keyboard" keyboard_split="$keyboard"
keyboard_base=`echo "$keyboard" | sed 's/_\(left\|right\)//'` keyboard_base=`echo "$keyboard" | sed -e 's/_\(left\|right\)//' -e 's/@.*//'`
configfile="${GITHUB_WORKSPACE}/miryoku_zmk/miryoku/custom_config.h" configfile="${GITHUB_WORKSPACE}/miryoku_zmk/miryoku/custom_config.h"
tmpfile="$configfile.tmp" tmpfile="$configfile.tmp"
echo -n '#define ' > "$tmpfile" echo -n '#define ' > "$tmpfile"
echo -n "MIRYOKU_KEYBOARD_$keyboard_base" | tr -c '[:alnum:]' '_' |tr '[:lower:]' '[:upper:]' >> "$tmpfile" echo -n "MIRYOKU_KEYBOARD_$keyboard_base" | tr -c '[:alnum:]' '_' | tr '[:lower:]' '[:upper:]' >> "$tmpfile"
echo >> "$tmpfile" echo >> "$tmpfile"
cat "$configfile" >> "$tmpfile" cat "$configfile" >> "$tmpfile"
mv "$tmpfile" "$configfile" mv "$tmpfile" "$configfile"

View File

@ -225,7 +225,7 @@ See https://github.com/manna-harbour/miryoku/discussions/81 for available and su
Outboards are files containing out-of-tree board and shield definition metadata. Outboards are files containing out-of-tree board and shield definition metadata.
Files are at [[.github/workflows/outboards]]. Outboards for boards and shields are contained in the corresponding subdirectories. Files are named after the board or shield. Files are at [[.github/workflows/outboards]]. Outboards for boards and shields are contained in the corresponding subdirectories. Files are named after the base board or shield name (i.e. without revision or ~_left~ / ~_right~ suffixes).
Outboards contain Bourne shell variable assignments. Supported variables are described below. See the files for samples. Outboards contain Bourne shell variable assignments. Supported variables are described below. See the files for samples.