Files
MX_Pmodule/scripts/Bootstrap/compile_pmodules.sh
2015-07-09 10:22:34 +02:00

25 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
declare -r BASE_DIR=$(cd "$(dirname $0)/../.." && pwd)
declare -r BOOTSTRAP_DIR="${BASE_DIR}/scripts/Bootstrap"
source "${BOOTSTRAP_DIR}/Pmodules_version.conf"
unset PMODULES_HOME
source "/opt/psi/config/environment.bash"
if [[ -n ${PMODULES_DIR} ]] && [[ "${PMODULES_DIR}" != "/" ]] && [[ -d "${PMODULES_DIR}" ]]; then
rm -rf "${PMODULES_DIR}"
fi
${BOOTSTRAP_DIR}/coreutils/build --bootstrap --disable-cleanup || { echo "compiling 'coreutils' failed!"; exit 1; }
${BOOTSTRAP_DIR}/gettext/build --bootstrap --disable-cleanup || { echo "compiling 'gettext' failed!"; exit 1; }
${BOOTSTRAP_DIR}/getopt/build --bootstrap --disable-cleanup || { echo "compiling 'getopt' failed!"; exit 1; }
${BOOTSTRAP_DIR}/dialog/build --bootstrap --disable-cleanup || { echo "compiling 'dialog' failed!"; exit 1; }
${BOOTSTRAP_DIR}/bash/build --bootstrap --disable-cleanup 4.3.30 || { echo "compiling 'bash' failed!"; exit 1; }
${BOOTSTRAP_DIR}/Tcl/build --bootstrap --disable-cleanup || { echo "compiling 'Tcl' failed!"; exit 1; }
${BOOTSTRAP_DIR}/Modules/build --bootstrap || { echo "compiling 'Modules' failed!"; exit 1; }
mv -v "${PMODULES_HOME}/bin/modulecmd" "${PMODULES_HOME}/bin/modulecmd.tcl"
echo "Done..."