parent
d7efb0d6ad
commit
a9c256e74f
11
init
11
init
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
|
||||||
NEEDS="needs to be installed through your distro's package manager"
|
NEEDS="needs to be installed through your distro's package manager"
|
||||||
|
|
||||||
|
@ -10,22 +11,22 @@ function fail {
|
||||||
failed=false
|
failed=false
|
||||||
|
|
||||||
if ! whereis python3 | grep "/" &> /dev/null; then
|
if ! whereis python3 | grep "/" &> /dev/null; then
|
||||||
echo "python3" $NEEDS
|
echo "python3 $NEEDS"
|
||||||
failed=true
|
failed=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! whereis pip3 | grep "/" &> /dev/null; then
|
if ! whereis pip3 | grep "/" &> /dev/null; then
|
||||||
echo "pip3" $NEEDS
|
echo "pip3 $NEEDS"
|
||||||
failed=true
|
failed=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! whereis pdflatex | grep "/" &> /dev/null; then
|
if ! whereis pdflatex | grep "/" &> /dev/null; then
|
||||||
echo "texlive" $NEEDS
|
echo "texlive $NEEDS"
|
||||||
failed=true
|
failed=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! whereis gs | grep "/" &> /dev/null; then
|
if ! whereis gs | grep "/" &> /dev/null; then
|
||||||
echo "ghostscript" $NEEDS
|
echo "ghostscript $NEEDS"
|
||||||
failed=true
|
failed=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -47,4 +48,4 @@ for com in "${commands[@]}"; do
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "UnderCover Init Succeeded!"
|
echo "UnderCover Init Succeeded!"
|
||||||
touch $SCRIPT_DIR/.undercover_init_successful
|
touch "$SCRIPT_DIR/.undercover_init_successful"
|
||||||
|
|
3
start
3
start
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
|
||||||
|
|
||||||
if ! test -f "$SCRIPT_DIR/.undercover_init_successful"; then
|
if ! test -f "$SCRIPT_DIR/.undercover_init_successful"; then
|
||||||
|
@ -7,7 +8,7 @@ if ! test -f "$SCRIPT_DIR/.undercover_init_successful"; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! pip3 -V | grep "$SCRIPT_DIR/.venv"; then
|
if ! pip3 -V | grep -E "$SCRIPT_DIR/\.?venv"; then
|
||||||
echo "Entering virtual environment..."
|
echo "Entering virtual environment..."
|
||||||
source "$SCRIPT_DIR/.venv/bin/activate"
|
source "$SCRIPT_DIR/.venv/bin/activate"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -15,8 +15,5 @@ def optimize_css_file():
|
||||||
static_dir = root + '/undercover/undercover/static/'
|
static_dir = root + '/undercover/undercover/static/'
|
||||||
css = open(static_dir + 'styles.css', 'r').read()
|
css = open(static_dir + 'styles.css', 'r').read()
|
||||||
minified = optimize_css(css)
|
minified = optimize_css(css)
|
||||||
minified_file = open(static_dir + 'styles_min.css', 'w')
|
with open(static_dir + 'styles_min.css', 'w') as minified_file:
|
||||||
minified_file.write(minified)
|
minified_file.write(minified)
|
||||||
minified_file.close()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ from flask import (Blueprint, render_template, request, make_response)
|
||||||
from wtforms import Form, StringField, TextAreaField, validators
|
from wtforms import Form, StringField, TextAreaField, validators
|
||||||
|
|
||||||
import undercover.db as db
|
import undercover.db as db
|
||||||
from undercover.latty import CLData
|
from undercover.pdf_builder import CLData
|
||||||
|
|
||||||
index_cache = None
|
index_cache = None
|
||||||
writing_blueprint = Blueprint('writing', __name__,)
|
writing_blueprint = Blueprint('writing', __name__,)
|
||||||
|
|
Loading…
Reference in New Issue