mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-24 00:47:57 -05:00
* add demo file and start a short doc * fix some annotations * do not display hidden line (SIP_SKIP, delete) * use a defined var for SIP_SKIP * remove constructor definition in header * fix comment after method definition in header * add a test for sipify itself
37 lines
889 B
Bash
Executable File
37 lines
889 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
DIR=$(git rev-parse --show-toplevel)
|
|
|
|
# GNU prefix command for mac os support (gsed, gsplit)
|
|
GP=
|
|
if [[ "$OSTYPE" =~ darwin* ]]; then
|
|
GP=g
|
|
fi
|
|
|
|
pushd ${DIR} > /dev/null
|
|
|
|
code=0
|
|
while read -r sipfile; do
|
|
if ! grep -Fxq "$sipfile" python/auto_sip.blacklist; then
|
|
header=$(sed -E 's/(.*)\.sip/src\/\1.h/' <<< $sipfile)
|
|
if [ ! -f $header ]; then
|
|
echo "*** Missing header: $header for sipfile $sipfile"
|
|
else
|
|
outdiff=$(./scripts/sipify.pl $header | diff python/$sipfile -)
|
|
if [[ -n $outdiff ]]; then
|
|
echo " *** SIP file not up to date: $sipfile"
|
|
code=1
|
|
fi
|
|
fi
|
|
fi
|
|
done < <(
|
|
sed -n -r 's/^%Include (.*\.sip)/core\/\1/p' python/core/core.sip
|
|
sed -n -r 's/^%Include (.*\.sip)/gui\/\1/p' python/gui/gui.sip
|
|
sed -n -r 's/^%Include (.*\.sip)/analysis\/\1/p' python/analysis/analysis.sip
|
|
)
|
|
|
|
|
|
popd > /dev/null
|
|
|
|
exit $code
|