postgresql: upgrade to release 13.8
[LibreOffice.git] / bin / moveglobalheaders.sh
blob0de4cf5fc705d2c7f63e1dea7acf73b33b434a7f
1 #!/usr/bin/env bash
2 # This file is part of the LibreOffice project.
4 # This Source Code Form is subject to the terms of the Mozilla Public
5 # License, v. 2.0. If a copy of the MPL was not distributed with this
6 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 topdirs=`find . -mindepth 1 -maxdepth 1 -type d -not -name sal`
9 mkdir -p include/
10 for dir in $topdirs
12 dir=`echo "$dir"| sed -e 's/^..//'`
13 if test -d $dir/inc/$dir
14 then
15 if test -f $dir/Package_inc.mk
16 then
17 if test -f $dir/Module_$dir.mk
18 then
19 git mv $dir/inc/$dir include/$dir
20 git rm $dir/Package_inc.mk
21 grep -v Package_inc $dir/Module_$dir.mk > $dir/Module_dir.mk.new
22 mv -f $dir/Module_dir.mk.new $dir/Module_$dir.mk
23 git add $dir/Module_$dir.mk
24 else
25 echo "WARN: no $dir/Module_$dir.mk"
27 else
28 echo "WARN: no file $dir/Package_inc.mk"
31 done
32 #grep -v Package_inc.mk sal/CustomTarget_sal_allheaders.mk > sal/CustomTarget_sal_allheaders.mk.new
33 #mv sal/CustomTarget_sal_allheaders.mk.new sal/CustomTarget_sal_allheaders.mk
34 #git add sal/CustomTarget_sal_allheaders.mk
36 # we like to be special ...
37 sed -ie 's/\/svtools\/inc\/svtools/\/include\/svtools\//' svtools/Library_svt.mk
38 sed -ie 's/\/sfx2\/inc\/sfx2/\/include\/sfx2\//' sfx2/Library_sfx.mk
39 git add svtools/Library_svt.mk sfx2/Library_sfx.mk
41 # urgh
42 sed -ie 's/\.\.\/svx\//svx\//' svx/source/svdraw/svdoashp.cxx
43 git add svx/source/svdraw/svdoashp.cxx