-
Notifications
You must be signed in to change notification settings - Fork 0
/
initialize.sh
executable file
·46 lines (42 loc) · 1.17 KB
/
initialize.sh
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
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
# Install all dependencies for python virtual environment
sudo apt update
sudo apt upgrade -y
sudo apt-get install python3-venv -y
python -m venv venv
source ./venv/bin/activate
# install dependencies for project
pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
# Install all dependencies for bash script
sudo apt install fbi vlc jq dos2unix -y
sudo apt install libimage-exiftool-perl -y
sleep 5
# Define the default configuration
SCRIPT_PATH="$(realpath "$(dirname "$0")")"
CONFIG_FILE="$SCRIPT_PATH/app_config.json"
default_config=$(
jq -n \
--arg td "./app_data/content" \
--argjson ug false \
--arg ga "" \
--arg dd "" \
--arg ot "19:30:00" \
--arg ont "07:30:00" \
--arg dt "10" \
--arg bt "900" \
--arg py "./venv" \
'{
TARGET_DIR: $td,
USE_GDRIVE: $ug,
GOOGLE_API_ACCESS: $ga,
DRIVE_DIR_ID: $dd,
OFF_TIME: $ot,
ON_TIME: $ont,
DISPLAYTIME: $dt,
BLENDTIME: $bt,
PYENV: $py
}'
)
echo "$default_config" >$CONFIG_FILE
echo -e "Finished installing dependencies\n-----------------------------\n"