mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-11-18 03:13:38 +01:00
38 lines
512 B
Bash
38 lines
512 B
Bash
#!/bin/bash
|
|
# This script loads the Quantum Package environment. It should be invoked as
|
|
# source quantum_package.rc
|
|
|
|
|
|
QP_ROOT="/NOT/FOUND"
|
|
case "$(ps -p $$ -ocomm=)" in
|
|
"zsh")
|
|
QP_ROOT=$(dirname $0)
|
|
;;
|
|
*)
|
|
QP_ROOT=$(dirname ${BASH_SOURCE}[0])
|
|
;;
|
|
esac
|
|
|
|
export QP_ROOT="$( cd $QP_ROOT ; pwd -P )"
|
|
|
|
|
|
|
|
WD=$PWD
|
|
|
|
cd $QP_ROOT/etc
|
|
for SCRIPT in *.rc
|
|
do
|
|
source $SCRIPT
|
|
done
|
|
cd $WD
|
|
|
|
|
|
|
|
if [[ -z ${QP_ROOT} ]]
|
|
then
|
|
echo The QP_ROOT environment variable is not set. Run
|
|
|
|
./configure --help
|
|
|
|
fi
|