Add script to check which imag commands changed since they were last installed

This commit is contained in:
Matthias Beyer 2018-04-06 16:12:57 +02:00
parent bfb9124185
commit 5cd4678ff6
1 changed files with 12 additions and 0 deletions

12
scripts/which-commands-changed Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
# Find all imag commands which changed since last install
imag versions |\
grep "imag-" |\
sed 's,v.*-g,,' |\
while read binary hash; do
git diff "$hash..master" --name-only | \
grep "$binary" >/dev/null 2>/dev/null && \
echo "$binary changed since last install (was $hash)"
done