2021-03-23 11:18:57 +00:00
|
|
|
#!/bin/bash
|
2021-05-07 10:08:33 +00:00
|
|
|
# """
|
|
|
|
# project: Backuppy
|
|
|
|
# version: 0.8
|
|
|
|
# file: install.sh
|
|
|
|
# summary: main entry shell script
|
|
|
|
# """
|
2021-03-23 11:18:57 +00:00
|
|
|
|
2021-05-05 15:22:57 +00:00
|
|
|
# Check if graphical installer should be executed
|
|
|
|
if [ "$1" == "--gui" ]; then
|
2021-05-07 10:08:33 +00:00
|
|
|
# Check if PIP ist installed
|
2021-05-06 17:40:07 +00:00
|
|
|
if ! command -v pip3> /dev/null
|
|
|
|
then
|
|
|
|
echo "Please install PIP on your system for the graphical version of Backuppy!"
|
|
|
|
exit
|
2021-05-05 15:22:57 +00:00
|
|
|
fi
|
2021-05-07 10:08:33 +00:00
|
|
|
# Check if PIP module "PySide2" is installed
|
|
|
|
if ! pip list | grep PySide2> /dev/null
|
|
|
|
then
|
|
|
|
# Install PySide2
|
2021-05-07 11:16:13 +00:00
|
|
|
echo -e "Installing necessary PySide2 package for GUI-mode."
|
2021-05-07 10:08:33 +00:00
|
|
|
pip3 install PySide2
|
|
|
|
fi
|
|
|
|
# Launch python installer in GUI mode
|
2021-05-06 17:40:07 +00:00
|
|
|
python3 -B install.py "$1"
|
|
|
|
else
|
2021-05-07 10:08:33 +00:00
|
|
|
# Launch python installer in CLI mode
|
2021-05-06 17:40:07 +00:00
|
|
|
python3 -B install.py
|
2021-05-05 15:22:57 +00:00
|
|
|
fi
|