let's hope that works

This commit is contained in:
Luke Smith 2021-03-21 15:49:19 -04:00
parent e4878d215d
commit aa9ce687d1
No known key found for this signature in database
GPG Key ID: 4C50B54A911F6252
2 changed files with 18 additions and 9 deletions

View File

@ -11,15 +11,24 @@ check_size() {
fi fi
} }
check_md_name() {
shouldname="$(echo "$1" |
iconv --to-code=utf-8 |
sed "s/^\(src\/\)\?/src\//" |
tr '[:upper:]' '[:lower:]' |
tr ' ' '-')"
if [ "$shouldname" != "$1" ]; then
echo "$1 should be named $shouldname."
exit 1
fi
}
git diff --name-only `git merge-base origin/master HEAD` | while IFS= read -r file; do git diff --name-only `git merge-base origin/master HEAD` | while IFS= read -r file; do
case "$file" in case "$file" in
*.webp) *.webp)
echo "Checking size of $file" echo "Checking size of $file"
check_size $file check_size $file
;; ;;
*) *.md) check_md_name "$file" ;;
echo "Skipping $file"
;;
esac esac
done done

View File

@ -20,5 +20,5 @@
5. Garnish with chopped chives on top. 5. Garnish with chopped chives on top.
## Contribution ## Contribution
- Joe Powerhouse
- BTC: 1KPxw9js2VukakhMv2wUUFUQZnHQL842ju - Joe Powerhouse, BTC: 1KPxw9js2VukakhMv2wUUFUQZnHQL842ju