Updates for latest inspircd & anope
This commit is contained in:
17
precommit-hooks/find-mismatched-macs
Executable file
17
precommit-hooks/find-mismatched-macs
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
export IFS="
|
||||
"
|
||||
retcode=0
|
||||
|
||||
for macline in `grep -E '^\s+mac: ' examples/*.yml`; do
|
||||
if [ "${macline}" != "${macline,,}" ]; then
|
||||
mac="$( echo "${macline}" | awk '{ print $2; }')"
|
||||
retcode=1
|
||||
echo "${mac} has mismatched case -- should be lower."
|
||||
sed -i "s/${mac}/${mac,,}/g" examples/*.yml
|
||||
echo "Attempted replacement."
|
||||
fi
|
||||
done
|
||||
exit $retcode
|
||||
Reference in New Issue
Block a user