install.sh update

This commit is contained in:
Dadmehr 2023-09-09 00:04:00 +03:30
parent 701c52b681
commit 6fe748eaad
3 changed files with 6 additions and 3 deletions

View File

@ -5,6 +5,7 @@ Saves configuration in file as json file
import json
import logging
import os
from subprocess import run
# path to save the configuration file
from typing import Optional
@ -79,6 +80,7 @@ class Config:
logging.debug("config stopped")
def _create_backup(self):
chmod = run(['sudo', 'chmod', '+w', '/tmp'])
with open(temp_file, 'w') as f:
f.write(json.dumps(self._config_dict))
logging.debug("created backup")

View File

@ -3,7 +3,7 @@
if [ -e /etc/os-release ]; then
distro_info=$(cat /etc/os-release)
if [[ $distro_info == *"Manjaro"* ]]; then
if [[ $distro_info == *"arch"* ]]; then
echo "OS Manjaro: installing tk, python, python-pip, wmctrl"
sudo pacman -Sy
@ -11,7 +11,7 @@ if [ -e /etc/os-release ]; then
sudo pacman -S python
sudo pacman -S python-pip
sudo pacman -S wmctrl
elif [[ $distro_info == *"Ubuntu"* ]]; then
elif [[ $distro_info == *"debian"* ]]; then
echo "OS Ubuntu: installing tk, python, python-pip, wmctrl"
sudo apt update
@ -20,7 +20,7 @@ if [ -e /etc/os-release ]; then
sudo apt-get install python-pip
sudo apt install wmctrl
elif [[ $distro_info == *"Fedora"* ]]; then
elif [[ $distro_info == *"red hat"* ]]; then
echo "OS Fedora: installing tk, python, python-pip, wmctrl"
sudo dnf update

View File

@ -16,3 +16,4 @@ event-scheduler
mouse
pyautogui
mss
pyxdg