File: UpdateFromUpstream.sh

package info (click to toggle)
insighttoolkit5 5.4.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 704,404 kB
  • sloc: cpp: 783,697; ansic: 628,724; xml: 44,704; fortran: 34,250; python: 22,874; sh: 4,078; pascal: 2,636; lisp: 2,158; makefile: 461; yacc: 328; asm: 205; perl: 203; lex: 146; tcl: 132; javascript: 98; csh: 81
file content (71 lines) | stat: -rwxr-xr-x 2,043 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/usr/bin/env bash

set -e
set -x
shopt -s dotglob

readonly name="HDF5"
readonly ownership="HDF5 Maintainers <hdf5-maintainers@hdfgroup.org>"
readonly subtree="Modules/ThirdParty/HDF5/src/itkhdf5"
readonly repo="https://github.com/HDFGroup/hdf5.git"
readonly tag="hdf5-1_12_1"
readonly shortlog=false
readonly paths="
   ACKNOWLEDGMENTS
   CTestConfig.cmake
   README.txt
   config/cmake
   config/cmake_ext_mod
   config/clang-warnings
   config/gnu-warnings
   config/intel-warnings
   CMakeLists.txt
   CMakeInstallation.cmake
   CMakeFilters.cmake
   COPYING
   src
   c++/CMakeLists.txt
   c++/src
   hl/CMakeLists.txt
   hl/src
   hl/c++/CMakeLists.txt
   hl/c++/src
   UserMacros.cmake
   .clang-format
"

extract_source () {
    git_archive
    pushd "$extractdir/$name-reduced"
    sed -i.bak -e '1 s| /bin/sh|/bin/sh|' c++/src/h5c++.in config/cmake/libh5cc.in
    rm c++/src/h5c++.in.bak config/cmake/libh5cc.in.bak
    chmod a+x c++/src/h5c++.in config/cmake/libh5cc.in
    chmod a-x README.txt
    chmod a-x config/cmake/CTestScript.cmake
    chmod a-x config/cmake/HDF5_Examples_options.cmake
    chmod a-x config/cmake/libhdf5.pc.in
    chmod a-x config/cmake/scripts/*
    chmod a+x config/cmake/scripts/HPC

    sed s/$'\r'$// < config/cmake/scripts/CTestScript.cmake > output.txt
    cat output.txt > config/cmake/scripts/CTestScript.cmake
    rm output.txt

    sed s/$'\r'$// < config/cmake/scripts/HDF5config.cmake > output.txt
    cat output.txt > config/cmake/scripts/HDF5config.cmake
    rm output.txt

    rm -v config/cmake/scripts/HDF518config.cmake
    rm -v c++/src/C2Cppfunction_map.mht
    rm -v c++/src/C2Cppfunction_map.htm
    rm -v src/.indent.pro
    find . -name Makefile.am -delete
    find . -name Makefile.in -delete
    find . -name "*.lnt" -delete
    echo "* -whitespace" > .gitattributes
    popd
}

. "${BASH_SOURCE%/*}/../../../Utilities/Maintenance/update-third-party.bash"

echo "Don't forget to manually update the mangling as described in ${BASH_SOURCE%/*}/src/itkhdf5/src/itk_hdf5_mangle.h"