compile_pmodules.sh 980 Bytes
Newer Older
1 2 3 4 5
#!/bin/bash

declare -r BASE_DIR=$(cd "$(dirname $0)/../.." && pwd)
declare -r BOOTSTRAP_DIR="${BASE_DIR}/scripts/Bootstrap"

6
source "${BOOTSTRAP_DIR}/Pmodules_version.conf"
7

8 9 10
unset PMODULES_HOME
source "/opt/psi/config/environment.bash"

11 12 13 14 15
${BOOTSTRAP_DIR}/gettext/build --bootstrap || { echo "compiling 'gettext' failed!"; exit 1; }
${BOOTSTRAP_DIR}/getopt/build --bootstrap  || { echo "compiling 'getopt' failed!"; exit 1; }
${BOOTSTRAP_DIR}/dialog/build --bootstrap  || { echo "compiling 'dialog' failed!"; exit 1; }
${BOOTSTRAP_DIR}/bash/build --bootstrap    || { echo "compiling 'bash' failed!"; exit 1; }
${BOOTSTRAP_DIR}/Tcl/build --bootstrap     || { echo "compiling 'Tcl' failed!"; exit 1; }
16 17 18

# we have to remove the init directory - otherwise the next build will fail...
rm -rf "${PMODULES_HOME}/init"
19
${BOOTSTRAP_DIR}/Modules/build --bootstrap || { echo "compiling 'Modules' failed!"; exit 1; }
20
mv -v "${PMODULES_HOME}/bin/modulecmd" "${PMODULES_HOME}/bin/modulecmd.tcl"