#!/bin/bash

set -e

ret=0

for tag in expand margin margin-left margin-right; do
  echo "Checking '$tag'"
  if git grep "=\"${tag}\"" -- "*.ui" >& /dev/null; then
    echo "Found deprecated UI property ${tag}" 1>&2
    git --no-pager grep "=\"${tag}\"" -- "*.ui" 1>&2
    ret=1
  fi
done

exit $ret
