10
0
mirror of https://github.com/QuantumPackage/qp2.git synced 2024-11-16 19:13:50 +01:00
QuantumPackage/quantum_package.rc
2019-01-25 11:39:31 +01:00

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