Skip to content
Permalink
Browse files

fix prepare-commit after moving sip files

  • Loading branch information
3nids committed May 15, 2018
1 parent c5ee15a commit 395e864b6808467371c49ae907bd06d79dbe0ae8
Showing with 4 additions and 4 deletions.
  1. +4 −4 scripts/prepare-commit.sh
@@ -113,11 +113,11 @@ for f in $MODIFIED; do
# if cpp header
if [[ $f =~ ^src\/(core|gui|analysis|server)\/.*\.h$ ]]; then
# look if corresponding SIP file
sip_include=$(${GP}sed -r 's/^src\/(\w+)\/.*$/python\/\1\/\1.sip/' <<< $f )
sip_file=$(${GP}sed -r 's/^src\/(core|gui|analysis|server)\///; s/\.h$/.sip/' <<<$f )
module=$(${GP}sed -r 's/^src\/(core|gui|analysis|server)\/.*$/\1/' <<<$f )
sip_include=$(${GP}sed -r 's@^src/(\w+)/.*$@python/\1/\1.sip@' <<< $f )
sip_file=$(${GP}sed -r 's@^src/(core|gui|analysis|server)/@@; s@\.h$@.sip@' <<<$f )
module=$(${GP}sed -r 's@src/(core|gui|analysis|server)/.*$@\1@' <<<$f )
if grep -Fq "$sip_file" ${TOPLEVEL}/python/${module}/${module}_auto.sip; then
sip_file=$(${GP}sed -r 's/^src\///; s/\.h$/.sip.in/' <<<$f )
sip_file=$(${GP}sed -r 's@^src/(core|gui|analysis|server)@\1/auto_generated@; s@\.h$@.sip.in@' <<<$f )
m=python/$sip_file.$REV.prepare
touch python/$sip_file
cp python/$sip_file $m

0 comments on commit 395e864

Please sign in to comment.
You can’t perform that action at this time.