Compare commits
No commits in common. "499c113a21dd69b4f35e63ce139beef7d6ac1da0" and "043b436ba75233624369f0256d67f2da60c6a8da" have entirely different histories.
499c113a21
...
043b436ba7
4 changed files with 7 additions and 29 deletions
|
@ -7,7 +7,6 @@ import pathlib
|
|||
import os
|
||||
import getpass
|
||||
import tempfile
|
||||
import sys
|
||||
|
||||
|
||||
# CLI Args Parsing
|
||||
|
@ -36,34 +35,17 @@ log.setLevel(min(
|
|||
|
||||
# Pacman
|
||||
if config.getboolean('pacman', 'install_yay', fallback=False):
|
||||
log.info('Installing git and base-devel')
|
||||
proc = subprocess.run(('sudo', 'pacman', '-Syu', '--needed',
|
||||
'git', 'base-devel'))
|
||||
if proc.returncode != 0:
|
||||
log.error('Installation of git and base-devel failed')
|
||||
sys.exit(proc.returncode)
|
||||
|
||||
log.info('Installing yay')
|
||||
with tempfile.TemporaryDirectory() as yay_folder:
|
||||
log.info('Cloning yay')
|
||||
proc = subprocess.run(('git', 'clone',
|
||||
'https://aur.archlinux.org/yay', yay_folder))
|
||||
if proc.returncode != 0:
|
||||
log.error('Cloning of yay failed')
|
||||
sys.exit(proc.returncode)
|
||||
log.info('Compiling and installing yay')
|
||||
proc = subprocess.run(('makepkg', '-rcsi'), cwd=yay_folder)
|
||||
if proc.returncode != 0:
|
||||
log.error('Yay compile and install failed')
|
||||
sys.exit(proc.returncode)
|
||||
subprocess.run(('git', 'clone', 'https://aur.archlinux.org/yay', yay_folder))
|
||||
subprocess.run(('makepkg', '-rcsi'), cwd=yay_folder)
|
||||
|
||||
if config.getboolean('pacman', 'install_pkg', fallback=False):
|
||||
with open(config.get('pacman', 'pkg_list', fallback=''), 'r') as pkg_file:
|
||||
pkg_list = pkg_file.read().splitlines()
|
||||
log.info('Installing packages')
|
||||
proc = subprocess.run(('yay', '-Syu', '--needed', *pkg_list))
|
||||
if proc.returncode != 0:
|
||||
log.error('Package install failed')
|
||||
sys.exit(proc.returncode)
|
||||
subprocess.run(('yay', '-Syu', *pkg_list))
|
||||
|
||||
# Config files
|
||||
if 'config' in config:
|
||||
|
@ -76,5 +58,3 @@ if 'config' in config:
|
|||
log.debug(f'Copying {src} -> {dst}')
|
||||
dst.parent.mkdir(exist_ok=True)
|
||||
shutil.copy2(src, dst)
|
||||
|
||||
log.info('Autoconfig ended successfully')
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
[pacman]
|
||||
install_yay = False
|
||||
install_yay = True
|
||||
install_pkg = False
|
||||
pkg_list = pacman.list
|
||||
|
||||
[config]
|
||||
root = config
|
||||
kitty = kitty.conf:~/.config/kitty/kitty.conf
|
||||
#kitty-theme = kitty-theme.conf:~/.config/kitty/theme.conf
|
||||
kitty-theme = kitty-theme.conf:~/.config/kitty/theme.conf
|
||||
neovim = init.vim:~/.config/nvim/init.vim
|
||||
git = gitconfig:~/.gitconfig
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
font_family Fira Code
|
||||
font_size 12
|
||||
#include ./theme.conf
|
||||
include ./theme.conf
|
||||
|
||||
map ctrl+f2 detach_window
|
||||
map ctrl+f3 detach_window new-tab
|
||||
|
|
|
@ -1,4 +1,2 @@
|
|||
git
|
||||
fish
|
||||
sudo
|
||||
neovim
|
||||
|
|
Reference in a new issue