[6] | 1 | #!/bin/sh -f |
---|
| 2 | |
---|
| 3 | # |
---|
| 4 | # File produced by the obuild tool version 1.0 |
---|
[101] | 5 | # for the package snovis with version v1r1. |
---|
[6] | 6 | # |
---|
| 7 | |
---|
| 8 | #//////////////////////////////////////////////// |
---|
| 9 | # Usage : |
---|
| 10 | # UNIX> cd some_path/pack/version/obuild |
---|
| 11 | # ( UNIX> chmod a+x sh/broadcast_install ) |
---|
| 12 | # UNIX> sh/broadcast_install |
---|
| 13 | # |
---|
| 14 | #//////////////////////////////////////////////// |
---|
| 15 | |
---|
| 16 | obuild_args="$*" |
---|
| 17 | |
---|
| 18 | obuild_verbose=no |
---|
| 19 | |
---|
| 20 | obuild_set_x=no |
---|
| 21 | while test $# -ge 1 ; do |
---|
| 22 | case $1 in |
---|
| 23 | -v) obuild_verbose=yes ;; |
---|
| 24 | -x) obuild_set_x=yes ;; |
---|
| 25 | *) echo "unknown option : $1";exit ;; |
---|
| 26 | esac |
---|
| 27 | shift |
---|
| 28 | done |
---|
| 29 | |
---|
| 30 | if [ ${obuild_set_x} = yes ] ; then |
---|
| 31 | set -x |
---|
| 32 | fi |
---|
| 33 | |
---|
| 34 | # Binary directory is needed to create the obuild_find program. |
---|
| 35 | |
---|
| 36 | if [ "${OBUILD_PLATFORM}" = "" ] ; then |
---|
| 37 | obuild_platform=`uname` |
---|
| 38 | else |
---|
| 39 | obuild_platform=${OBUILD_PLATFORM} |
---|
| 40 | fi |
---|
| 41 | |
---|
| 42 | if [ "${obuild_platform}" = "" ] ; then |
---|
| 43 | echo "obuild_platform variable not defined." |
---|
| 44 | exit |
---|
| 45 | fi |
---|
| 46 | |
---|
| 47 | if [ "${OBUILD_DIR_BIN}" = "" ] ; then |
---|
| 48 | obuild_dir_bin=${obuild_platform}_obuild |
---|
| 49 | else |
---|
| 50 | obuild_dir_bin=${OBUILD_DIR_BIN} |
---|
| 51 | fi |
---|
| 52 | |
---|
| 53 | if [ "${obuild_dir_bin}" = "" ] ; then |
---|
| 54 | echo "obuild_dir_bin variable not defined." |
---|
| 55 | exit |
---|
| 56 | fi |
---|
| 57 | |
---|
| 58 | obuild_snovis_path=.. |
---|
| 59 | |
---|
| 60 | # Create the bin directory : |
---|
| 61 | /bin/mkdir -p "${obuild_snovis_path}/${obuild_dir_bin}" |
---|
| 62 | |
---|
| 63 | if [ ! -e "${obuild_snovis_path}/obuild/sh/install" ] ; then |
---|
| 64 | echo "install script not found for package snovis." |
---|
| 65 | exit |
---|
| 66 | fi |
---|
| 67 | if [ ${obuild_verbose} = yes ] ; then |
---|
| 68 | echo "install setups of snovis"... |
---|
| 69 | fi |
---|
| 70 | cd "${obuild_snovis_path}/obuild" |
---|
| 71 | ./sh/install |
---|
| 72 | |
---|
| 73 | if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" ] ; then |
---|
| 74 | if [ ! -e "${obuild_snovis_path}/obuild/cpp/obuild_find.cpp" ] ; then |
---|
| 75 | echo "Program source obuild_find.cpp not found." |
---|
| 76 | exit |
---|
| 77 | fi |
---|
| 78 | if [ "${obuild_cxx_command}" = "" ] ; then |
---|
| 79 | if [ "${OBUILD_CXX}" != "" ] ; then |
---|
| 80 | obuild_find_compiler=${OBUILD_CXX} |
---|
| 81 | else |
---|
| 82 | obuild_find_compiler=c++ |
---|
| 83 | fi |
---|
| 84 | else |
---|
| 85 | obuild_find_compiler=${obuild_cxx_command} |
---|
| 86 | fi |
---|
| 87 | ${obuild_find_compiler} -o "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" "${obuild_snovis_path}/obuild/cpp/obuild_find.cpp" |
---|
| 88 | unset obuild_find_compiler |
---|
| 89 | if [ ! -e "${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" ] ; then |
---|
| 90 | echo "Program obuild_find not found." |
---|
| 91 | exit |
---|
| 92 | fi |
---|
| 93 | fi |
---|
| 94 | obuild_find_exe="${obuild_snovis_path}/${obuild_dir_bin}/obuild_find" |
---|
| 95 | if [ "${obuild_find_exe}" = "" ] ; then |
---|
| 96 | echo "Variable obuild_find_exe not defined." |
---|
| 97 | exit |
---|
| 98 | fi |
---|
| 99 | obuild_OnX_path=`"${obuild_find_exe}" OnX 'v17r*'` |
---|
| 100 | if [ "${obuild_OnX_path}" = "" ] ; then |
---|
| 101 | echo "Can't find OnX package." |
---|
| 102 | exit |
---|
| 103 | fi |
---|
| 104 | if [ "${obuild_find_exe}" = "" ] ; then |
---|
| 105 | echo "Variable obuild_find_exe not defined." |
---|
| 106 | exit |
---|
| 107 | fi |
---|
| 108 | obuild_G4Lab_path=`"${obuild_find_exe}" G4Lab 'v8r*'` |
---|
| 109 | if [ "${obuild_G4Lab_path}" = "" ] ; then |
---|
| 110 | echo "Can't find G4Lab package." |
---|
| 111 | exit |
---|
| 112 | fi |
---|
| 113 | |
---|
| 114 | # install setup scripts of used packages : |
---|
| 115 | if [ ! -e "${obuild_OnX_path}/obuild/sh/broadcast_install" ] ; then |
---|
| 116 | echo "broadcast_install script not found for package OnX." |
---|
| 117 | exit |
---|
| 118 | fi |
---|
| 119 | cd "${obuild_OnX_path}/obuild" |
---|
| 120 | ./sh/broadcast_install ${obuild_args} |
---|
| 121 | |
---|
| 122 | if [ ! -e "${obuild_G4Lab_path}/obuild/sh/broadcast_install" ] ; then |
---|
| 123 | echo "broadcast_install script not found for package G4Lab." |
---|
| 124 | exit |
---|
| 125 | fi |
---|
| 126 | cd "${obuild_G4Lab_path}/obuild" |
---|
| 127 | ./sh/broadcast_install ${obuild_args} |
---|
| 128 | |
---|