summaryrefslogtreecommitdiff
path: root/install.sh
blob: b5152ea32bb7c4a5be0321aebb3c662570ee312e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env sh

DESTINATION="${1}"

if [ -z "${DESTINATION}" ]
then
	printf "missing destination directory...\n"
	printf "\n"
	printf "Usage:\n"
	printf "    install.sh <directory>\n"
	printf "\n"
	printf "Installs the server to the given directory.\n"

	exit 1
fi

mkdir -p "${DESTINATION}"

cp "apple-touch-icon.png" "${DESTINATION}"
cp "favicon.ico" "${DESTINATION}"
cp "index.php" "${DESTINATION}"
cp "robots.txt" "${DESTINATION}"

cp -r "font" "${DESTINATION}"
cp -r "html" "${DESTINATION}"
cp -r "image" "${DESTINATION}"
cp -r "include" "${DESTINATION}"
cp -r "svg" "${DESTINATION}"

mkdir -p "${DESTINATION}/cache"
mkdir -p "${DESTINATION}/css"
mkdir -p "${DESTINATION}/js"

cp "css/"*".css" "${DESTINATION}/css"
cp "js/"*".js" "${DESTINATION}/js"