if [ -f /var/lib/lua/lua-5.3_flag ]; then
    /usr/sbin/alternatives \
    --install /usr/bin/lua lua /usr/bin/lua5.3 503 \
    --slave /usr/bin/luac luac /usr/bin/luac5.3 \
    --slave /usr/share/man/man1/lua.1.gz lua.1.gz /usr/share/man/man1/lua5.3.1.gz \
    --slave /usr/share/man/man1/luac.1.gz luac.1.gz /usr/share/man/man1/luac5.3.1.gz \
    ;
else
  /usr/sbin/alternatives \
  --remove lua /usr/bin/lua5.3 \
  || echo "--- Ignored an error."
fi
rm -f /var/lib/lua/liblua-devel-5.3_flag
rmdir --ignore-fail-on-non-empty /var/lib/lua
