mirror of
https://github.com/Afilmory/afilmory
synced 2026-04-30 09:46:38 +00:00
25 lines
664 B
Bash
25 lines
664 B
Bash
#! /bin/bash
|
|
|
|
set -e
|
|
|
|
# Clone demo photos from remote repo if local photos directory is empty
|
|
if [ ! -d "photos" ] || [ -z "$(ls -A photos 2>/dev/null)" ]; then
|
|
echo "Fetching demo photos from https://github.com/Afilmory/demo-photos..."
|
|
rm -rf photos
|
|
git clone --depth 1 https://github.com/Afilmory/demo-photos photos
|
|
rm -rf photos/.git
|
|
fi
|
|
|
|
mkdir -p ./apps/web/public/photos
|
|
cp -r photos/* ./apps/web/public/photos/
|
|
|
|
echo 'import { defineBuilderConfig } from "@afilmory/builder";
|
|
|
|
export default defineBuilderConfig(() => ({
|
|
storage: {
|
|
provider: "local",
|
|
basePath: "./apps/web/public/photos",
|
|
baseUrl: "/photos",
|
|
},
|
|
}))' >builder.config.ts
|