-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathinstall
More file actions
executable file
·35 lines (27 loc) · 1.24 KB
/
Copy pathinstall
File metadata and controls
executable file
·35 lines (27 loc) · 1.24 KB
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
#! /bin/bash
# This should really be a for real-real setup.py with all the manifest stuff it needs,
# but what if I'm lazy and am not doing that.
set -e
if [ -z "$1" ] ; then
echo "No installation directory provided."
exit 1
fi
INSTALLDIR="$1"
mkdir -p "${INSTALLDIR}"
# First, copy the essential scripts and config.
cp -v alembic.ini app.py data.py env.py events.py helpers.py manage.py presence.py pystreaming.py rest.py sockets.py "${INSTALLDIR}"
# Copy migrations over without any local pycache.
mkdir -p "${INSTALLDIR}/versions"
cp -v versions/*.py "${INSTALLDIR}/versions/"
# Copy templates over wholesale.
mkdir -p "${INSTALLDIR}/templates"
find templates -maxdepth 1 -not -path '*/.*' -type f -exec cp -v '{}' "${INSTALLDIR}/templates/" ';'
# Copy static over, but not the emoji directory itself, because the destination
# could have different installed emoji than the debug server.
mkdir -p "${INSTALLDIR}/static"
mkdir -p "${INSTALLDIR}/static/themes/"
find static -maxdepth 1 -not -path '*/.*' -type f -exec cp -v '{}' "${INSTALLDIR}/static/" ';'
cp -rv static/themes "${INSTALLDIR}/static/"
# Copy the self-hosted twemoji assets over.
echo "'static/twemoji/' -> '${INSTALLDIR}/static/twemoji/'"
cp -r static/twemoji "${INSTALLDIR}/static/"