mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-27 00:03:38 -04:00
39 lines
605 B
Bash
Executable File
39 lines
605 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# ARGUMENTS
|
|
REMOVE_COMMENTS=YES
|
|
while getopts ":c" opt; do
|
|
case $opt in
|
|
c)
|
|
# keep comments
|
|
REMOVE_COMMENTS=NO
|
|
;;
|
|
\?)
|
|
echo "Invalid option: -$OPTARG" >&2
|
|
exit 1
|
|
;;
|
|
esac
|
|
done
|
|
shift $(expr $OPTIND - 1)
|
|
|
|
# GNU prefix command for mac os support (gsed, gsplit)
|
|
GP=
|
|
if [[ "$OSTYPE" =~ darwin* ]]; then
|
|
GP=g
|
|
fi
|
|
|
|
for file in $*; do
|
|
d=${file#*/}
|
|
d=${d%/*}
|
|
f=${file##*/}
|
|
f=${f%.*}
|
|
|
|
tempfile=$(${GP}mktemp ${f}XXXX --suffix=.h)
|
|
|
|
./scripts/sipify.pl "src/$d/$f.h" > $tempfile
|
|
|
|
vimdiff $tempfile python/$d/$f.sip
|
|
|
|
rm $tempfile
|
|
done
|