Files
lammps/tools/offline/scripts/use_pip_cache.sh
2021-04-29 13:26:55 -04:00

20 lines
395 B
Bash

#!/bin/bash
# needs to be sourced
if [ -z "${PIP_CACHE_DIR}" ]
then
echo "Must set PIP_CACHE_DIR environment variable"
exit 1
fi
export PIP_NO_INDEX=1
export PIP_FIND_LINKS=$PIP_CACHE_DIR
echo "Disabling pip index and use local cache directory..."
function deactivate_pip_cache {
echo "Removing local pip cache configuration..."
unset PIP_NO_INDEX
unset PIP_FIND_LINKS
}