mirror of
https://github.com/okxlin/appstore.git
synced 2026-09-23 16:01:01 +00:00
18 lines
388 B
Bash
Executable File
18 lines
388 B
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
if [[ -f "$SCRIPT_DIR/../.env" ]]; then
|
|
set -a
|
|
# shellcheck disable=SC1091
|
|
source "$SCRIPT_DIR/../.env"
|
|
set +a
|
|
fi
|
|
|
|
CONFIG_DIR="${APP_CONFIG_DIR:-./data}"
|
|
mkdir -p "$CONFIG_DIR"
|
|
|
|
if [ ! -f "$CONFIG_DIR/config.yaml" ]; then
|
|
cp "$SCRIPT_DIR/../data/config.yaml" "$CONFIG_DIR/config.yaml"
|
|
fi
|