#!/usr/bin/env sh root="$(git rev-parse --show-toplevel)" final="$(mktemp)" mode="$1" target="/dev/null" if [ "$mode" = "keymap.h" ]; then target="$root/src/keymaps/soispha/layout/keymap.h" elif [ "$mode" = "ledmap.h" ]; then target="$root/src/keymaps/soispha/led/ledlayout.h" elif [ "$mode" = "translation.h" ]; then target="$root/src/keymaps/soispha/led/translation.h" mode="ledmap.h" else echo "$mode" is invalid exit 2 fi format "$mode" "$target" >"$final" git add "$target" cat "$final" >"$target" rm "$final" # vim: ft=sh