docs: Set up basic download script

This commit is contained in:
Elian Doran 2024-07-20 12:23:56 +03:00
parent a71a53de97
commit 30c1810211
No known key found for this signature in database
4 changed files with 14 additions and 0 deletions

1
docs-new/.env Normal file
View File

@ -0,0 +1 @@
SHARE_URL=https://notes.eliandoran.me/share/4yYHqKbLovVX

1
docs-new/.env.example Normal file
View File

@ -0,0 +1 @@
SHARE_URL=https://notes.example.com/share/4yYHqKbLovVY

1
docs-new/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
output

11
docs-new/prepare.sh Executable file
View File

@ -0,0 +1,11 @@
if [ ! -f .env ]; then
echo "Missing .env file, cannot proceed."
exit 1
fi
output_dir="output"
rm -rf "$output_dir"
mkdir -p "$output_dir"
source ./.env
wget -rp -e robots=off "$SHARE_URL" -P "$output_dir"