diff --git a/tools/offline/init_caches.sh b/tools/offline/init_caches.sh index 692ebc257a..d856c48df0 100755 --- a/tools/offline/init_caches.sh +++ b/tools/offline/init_caches.sh @@ -13,7 +13,7 @@ else fi SCRIPT_DIR="$(dirname "$(realpath "$0")")" -CACHE_SCRIPTS_DIR=${SCRIPT_DIR}/scripts +CACHE_SCRIPTS_DIR="${SCRIPT_DIR}/scripts" if [ -z "${LAMMPS_DIR}" ] then @@ -24,10 +24,10 @@ else echo "Using $LAMMPS_DIR as LAMMPS distribution base directory..." fi -export GITHUB_PROXY_DIR=$LAMMPS_CACHING_DIR/github -export LOGGING_DIR=$LAMMPS_CACHING_DIR/logs -export PIP_CACHE_DIR=$LAMMPS_CACHING_DIR/pip -export HTTP_CACHE_DIR=$LAMMPS_CACHING_DIR/http +export GITHUB_PROXY_DIR="$LAMMPS_CACHING_DIR/github" +export LOGGING_DIR="$LAMMPS_CACHING_DIR/logs" +export PIP_CACHE_DIR="$LAMMPS_CACHING_DIR/pip" +export HTTP_CACHE_DIR="$LAMMPS_CACHING_DIR/http" mkdir -p $GITHUB_PROXY_DIR mkdir -p $LOGGING_DIR @@ -36,7 +36,7 @@ mkdir -p $HTTP_CACHE_DIR ${CACHE_SCRIPTS_DIR}/init_pip_cache.sh ${CACHE_SCRIPTS_DIR}/init_git_cache.sh -${CACHE_SCRIPTS_DIR}/init_http_cache.sh +${CACHE_SCRIPTS_DIR}/init_http_cache.sh echo "##############################################################################" echo echo "To activate:" diff --git a/tools/offline/use_caches.sh b/tools/offline/use_caches.sh index 64e7d7a875..d0e4a14570 100644 --- a/tools/offline/use_caches.sh +++ b/tools/offline/use_caches.sh @@ -14,32 +14,32 @@ else script=$0 fi SCRIPT_DIR="$(dirname "$(realpath "$script")")" -CACHE_SCRIPTS_DIR=${SCRIPT_DIR}/scripts +CACHE_SCRIPTS_DIR="${SCRIPT_DIR}/scripts" -export GITHUB_PROXY_DIR=$LAMMPS_CACHING_DIR/github -export LOGGING_DIR=$LAMMPS_CACHING_DIR/logs -export PIP_CACHE_DIR=$LAMMPS_CACHING_DIR/pip -export HTTP_CACHE_DIR=$LAMMPS_CACHING_DIR/http +export GITHUB_PROXY_DIR="$LAMMPS_CACHING_DIR/github" +export LOGGING_DIR="$LAMMPS_CACHING_DIR/logs" +export PIP_CACHE_DIR="$LAMMPS_CACHING_DIR/pip" +export HTTP_CACHE_DIR="$LAMMPS_CACHING_DIR/http" -if [ ! -d $GITHUB_PROXY_DIR ] +if [ ! -d "${GITHUB_PROXY_DIR}" ] then echo "GitHub proxy directory missing" return fi -if [ ! -d $LOGGING_DIR ] +if [ ! -d "${LOGGING_DIR}" ] then echo "Logging directory missing" return fi -if [ ! -d $PIP_CACHE_DIR ] +if [ ! -d "${PIP_CACHE_DIR}" ] then echo "pip cache directory missing" return fi -if [ ! -d $HTTP_CACHE_DIR ] +if [ ! -d "${HTTP_CACHE_DIR}" ] then echo "HTTP cache directory missing" return @@ -49,9 +49,9 @@ echo "########################################################################## echo "Setting up LAMMPS offline compilation environment" echo "##############################################################################" -source ${CACHE_SCRIPTS_DIR}/use_git_cache.sh -source ${CACHE_SCRIPTS_DIR}/use_pip_cache.sh -source ${CACHE_SCRIPTS_DIR}/use_http_cache.sh +source "${CACHE_SCRIPTS_DIR}/use_git_cache.sh" +source "${CACHE_SCRIPTS_DIR}/use_pip_cache.sh" +source "${CACHE_SCRIPTS_DIR}/use_http_cache.sh" echo "##############################################################################" echo