35 lines
685 B
Plaintext
35 lines
685 B
Plaintext
|
#!/bin/bash
|
||
|
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
|
||
|
NEEDS="needs to be installed through your distro's package manager"
|
||
|
|
||
|
if ! whereis python3 | grep "/"; then
|
||
|
echo "python3" $NEEDS
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
if ! whereis pip3 | grep "/"; then
|
||
|
echo "pip3" $NEEDS
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
if ! whereis pdflatex | grep "/"; then
|
||
|
echo "texlive" $NEEDS
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
commands=(
|
||
|
"python3 -m venv $SCRIPT_DIR/.venv"
|
||
|
"source .venv/bin/activate"
|
||
|
"pip3 install -r requirements.txt"
|
||
|
)
|
||
|
|
||
|
for com in "${commands[@]}"; do
|
||
|
if ! $com; then
|
||
|
echo "UnderCover Init Failed!"
|
||
|
exit 1
|
||
|
fi
|
||
|
done
|
||
|
|
||
|
echo "UnderCover Init Succeeded!"
|
||
|
touch $SCRIPT_DIR/.undercover_init_successful
|