37 lines
876 B
Plaintext
Executable File
37 lines
876 B
Plaintext
Executable File
# setup: Set up application for the first time after cloning, or set it
|
|
# back to the initial first unused state.
|
|
|
|
# Load setup functions
|
|
source ./script/include/setup_functions.inc.sh
|
|
|
|
## Set option defaults
|
|
# If CREATE_VENV is not set, set it to "true"
|
|
if [ -z "${CREATE_VENV+is_set}" ]; then
|
|
CREATE_VENV="true"
|
|
fi
|
|
|
|
# If INSTALL_SASS is not set, set it to "false"
|
|
if [ -z "${INSTALL_SASS+is_set}" ]; then
|
|
INSTALL_SASS="false"
|
|
fi
|
|
|
|
## Main
|
|
# Remove any existing node modules as part of initial app setup or reset
|
|
rm -rf ./node_modules
|
|
|
|
if [ "${CREATE_VENV}" = "true" ]; then
|
|
# Ensure pipenv is installed
|
|
if ! check_system_pip_for pipenv; then
|
|
echo "ERROR: pipenv is required but is not present"
|
|
exit 1
|
|
fi
|
|
create_virtual_environment
|
|
fi
|
|
|
|
if [ "${INSTALL_SASS}" = "true" ]; then
|
|
install_sass
|
|
fi
|
|
|
|
# Install application dependencies
|
|
./script/bootstrap
|