cloud-backup/install.sh
2022-03-03 02:32:52 +01:00

28 lines
No EOL
404 B
Bash
Executable file

install () {
python3 -m pip install $1
}
install python-dotenv
# Install Python libraries for cloud provider
case $1 in
"gcs")
install google-cloud-storage
;;
"azure")
install azure-storage-blob
;;
"aws")
install boto3
;;
*) ;;
esac
# Create .env file if it doesn't exist
if [ ! -f ".env" ]; then
cp .env.example .env
sed -i "s/SERVICE_NAME=\"\"/SERVICE_NAME=\"$1\"" .env
fi