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