File size: 633 Bytes
9bf26a6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/bin/bash
variable_name="SCREENIPY_GUI"

cd src

# Check if the script was provided with at least one argument
if [ $# -lt 1 ]; then
    echo "Usage: $0 [--gui|--cli]"
    exit 1
fi

# Check the value of the first argument
if [ "$1" = "--gui" ]; then
	export SCREENIPY_GUI=TRUE
	echo " "
    echo "Starting in GUI mode... Copy and Paste following URL in your browser.."
	streamlit run streamlit_app.py --server.port=8501 --server.address=0.0.0.0
elif [ "$1" = "--cli" ]; then
	unset "SCREENIPY_GUI"
    echo "Starting in CLI mode..."
    python3 screenipy.py
else
    echo "Invalid argument. Usage: $0 [--gui|--cli]"
    exit 1
fi