You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

11 lines
539 B

#!/usr/bin/env bash
# This script sets up the necessary directories and permissions for model-cache and tsdata that were added after the initial release of the app.
set -euo pipefail
APP_DATA_DIR="$(readlink -f $(dirname "${BASH_SOURCE[0]}")/..)/data"
MODEL_CACHE_DIR="${APP_DATA_DIR}/model-cache"
TYPESENSE_DIR="${APP_DATA_DIR}/tsdata"
[ ! -d "${MODEL_CACHE_DIR}" ] && mkdir -p "${MODEL_CACHE_DIR}" && chown 1000:1000 "${MODEL_CACHE_DIR}"
[ ! -d "${TYPESENSE_DIR}" ] && mkdir -p "${TYPESENSE_DIR}" && chown 1000:1000 "${TYPESENSE_DIR}"