Skip to content

Commit

Permalink
fix prepare-commit after moving sip files
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed May 15, 2018
1 parent c5ee15a commit 395e864
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/prepare-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 395e864

Please sign in to comment.