old.martials.no/build_extra.sh

22 lines
373 B
Bash
Raw Normal View History

2022-12-23 14:57:53 +01:00
#!/bin/sh
if [ ! -e dist ]; then
echo "dist directory not found, running 'vite bulid'"
vite build
fi
2022-12-24 11:33:41 +01:00
# Copying the file ($1) to the dist directory, or to subdirectory ($2)
copy() {
if [ -e "$1" ]; then
cp "$1" dist/"$2"
2022-12-23 14:57:53 +01:00
else
2022-12-24 11:33:41 +01:00
echo "'$1' not found, skipping"
2022-12-23 14:57:53 +01:00
fi
2022-12-24 11:33:41 +01:00
}
2022-12-23 14:57:53 +01:00
2022-12-24 11:33:41 +01:00
mkdir -p "dist/.well-known"
copy robots.txt
copy security.txt .well-known
copy .htaccess