From e0456fde8dea39b26cd02905e1be8a0b0a7d2a70 Mon Sep 17 00:00:00 2001 From: "flyingscorpio@arch-desktop" Date: Wed, 22 Apr 2020 17:49:36 +0200 Subject: [PATCH] Add i3 installs, sddm --- install.py | 17 +++++++++-------- installation_scripts/i3.sh | 9 ++++++--- main_install.sh | 3 +++ 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/install.py b/install.py index 02fc40b..bb8105b 100755 --- a/install.py +++ b/install.py @@ -6,7 +6,6 @@ Shamelessly copied from https://github.com/dmerejkowsky/dotfiles. """ import argparse -import shlex import subprocess from typing import List, Optional from urllib.request import urlretrieve @@ -42,7 +41,7 @@ class Installer: if condition in conditions.keys(): return conditions[condition] - command = subprocess.run(shlex.split(condition), check=False) + command = subprocess.run(condition, check=False, shell=True) return command.returncode == 0 @@ -73,7 +72,7 @@ class Installer: ui.info_2("Cloning", url, "->", pretty_dest) git_command = "git clone {} {} --branch {}".format(url, p_dest, branch) - subprocess.run(shlex.split(git_command), check=True) + subprocess.run(git_command, check=True, shell=True) def do_copy(self, src: str, dest: str) -> None: """Copy two files.""" @@ -124,8 +123,9 @@ class Installer: return install = subprocess.run( - shlex.split(command), + command, check=False, + shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, ) @@ -144,7 +144,7 @@ class Installer: ui.info( ui.yellow, - "Please check if the package was really meant for {} systems." + "Are the packages really meant for {} systems?" .format(self.operating_system) ) @@ -156,7 +156,7 @@ class Installer: return ui.info_2("Running", "`{}`".format(command)) - subprocess.run(shlex.split(command), check=True) + subprocess.run(command, check=True, shell=True) self.base_dir.chdir() def do_symlink(self, src: str, dest: str) -> None: @@ -270,9 +270,10 @@ def define_os() -> str: if operating_system in ("debian", "ubuntu"): subprocess.run( - shlex.split("sudo apt update"), - stdout=subprocess.DEVNULL, + "sudo apt update", check=True, + shell=True, + stdout=subprocess.DEVNULL, ) return "debian based" diff --git a/installation_scripts/i3.sh b/installation_scripts/i3.sh index 03f7bfd..1ed57d1 100644 --- a/installation_scripts/i3.sh +++ b/installation_scripts/i3.sh @@ -12,6 +12,9 @@ if [ -z "$GITHUB_DOTFILES" ]; then fi # Install required packages {{{ +###### +# OK # +###### if [ "$OS" = 'arch' ]; then pacman -Qe i3-gaps || sudo pacman -S --needed i3 @@ -31,9 +34,9 @@ fi # }}} # Add clones from GitHub {{{ -############################ -# OK NEED TO DO GIT UPDATE # -############################ +###### +# OK # +###### mkdir -p "$GITHUB_DOTFILES" diff --git a/main_install.sh b/main_install.sh index 235f78d..dd5a8f6 100755 --- a/main_install.sh +++ b/main_install.sh @@ -306,6 +306,9 @@ setup_bash_git_prompt() { # {{{ } # }}} setup_i3() { # {{{ + ###### + # OK # + ###### # Update i3 configuration