-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·47 lines (31 loc) · 980 Bytes
/
Copy pathrun.sh
File metadata and controls
executable file
·47 lines (31 loc) · 980 Bytes
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
LOG_FILE="log.txt"
## change to directory, adjust paths
#############################################
#$user_name = "unknown"
#cd /home/$user_name/apps/font_hyper_manager/
## setup python environment, if required
###########################################
## Load pyenv automatically
#export PYENV_ROOT="$HOME/.pyenv"
#[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
#eval "$(pyenv init -)"
## Activate the virtual environment
#source /home/ad/path/to/venv/bin/activate
#pyenv activate envb
###########################################
# Set the environment variables
#export PYTHONPATH=$PYTHONPATH:$HOME/apps/font_hyper_manager
# Python code to execute
python_code="
import sys
sys.path.append('.')
sys.path.append('..')
import font_hyper.main_a1 as mod
# run main program
mod.main()
"
# Navigate to the directory
#cd $HOME/apps/font_hyper_manager
# Execute the Python code and log output
python3 -c "$python_code" > $LOG_FILE 2>&1