aboutsummaryrefslogtreecommitdiff
path: root/util/list-moved-keyboards.sh
blob: 1a39f512a256db93327ac1d71e70619cbefb7a3a (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env bash

echo "This might take a while... let it sit." >&2

git cherry upstream/master upstream/develop | awk '{print $2}' | while read sha1; do
    git diff --name-status -M25 ${sha1}^..${sha1} | grep 'keyboards/' | grep '^R' | grep -E '(info|keyboard).json'
done | sed -e 's@keyboards/@@g' -e 's@/info.json@@g' -e 's@/keyboard.json@@g' | sort -k+2 | while IFS=$'\n' read line; do
    if [[ $(echo $line | awk '{print $2}') != $(echo $line | awk '{print $3}') ]]; then
        echo $line
    fi
done | sort -k+2 | awk '{printf "| %s | %s |\n", $2, $3}' | column -t | sort