mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2025-04-28 05:02:26 +00:00
improved intendation on Input.multiple
This commit is contained in:
parent
309f8d0da3
commit
721ac3ec75
1 changed files with 24 additions and 6 deletions
26
lib.py
26
lib.py
|
@ -177,9 +177,9 @@ class Input:
|
|||
return inp
|
||||
break
|
||||
else:
|
||||
Print.err(f'Invalid input, range: 1-{max}')
|
||||
Print.err(f'Invalid input, range: 0-{max}')
|
||||
except ValueError:
|
||||
Print.err(f'Invalid input (must be number: 1-{max})')
|
||||
Print.err(f'Invalid input (must be number: 0-{max})')
|
||||
continue
|
||||
|
||||
Print.question(question)
|
||||
|
@ -240,7 +240,7 @@ class Install:
|
|||
raise TypeError(
|
||||
'check_not_installed() only takes string or list parameters')
|
||||
if package_name == ['base-devel']:
|
||||
# Check dependenceis for base-devel (group packages are not detected directly)
|
||||
# Check dependencies for base-devel (group packages are not detected directly)
|
||||
return Install.check_not_installed(
|
||||
'guile libmpc autoconf automake binutils bison fakeroot file findutils flex gawk gcc gettext grep groff gzip libtool m4 make pacman patch pkgconf sed sudo texinfo which')
|
||||
for package in package_name:
|
||||
|
@ -250,6 +250,24 @@ class Install:
|
|||
else:
|
||||
return True
|
||||
|
||||
def check_dir_exists(paths):
|
||||
'''Check for directory/ies existence
|
||||
|
||||
Arguments:
|
||||
paths {str} -- single path or multiple paths separated by spaces (absolute paths)
|
||||
|
||||
Returns:
|
||||
bool -- One of dirs exists/Single dir exists
|
||||
'''
|
||||
paths = paths.split(' ')
|
||||
for dir_path in paths:
|
||||
dir_path = os.path.expanduser(dir_path)
|
||||
if os.path.isdir(dir_path):
|
||||
return True
|
||||
break
|
||||
else:
|
||||
return False
|
||||
|
||||
def git_aur(repository, install_text='default', force=False):
|
||||
'''Install package directly from AUR using only git and makepkg
|
||||
|
||||
|
@ -269,7 +287,7 @@ class Install:
|
|||
f'Unable to install AUR repository: {repository}, git is not installed')
|
||||
return False
|
||||
|
||||
# Base-devel group includes (requered for makepkg)
|
||||
# Base-devel group includes (required for makepkg)
|
||||
if Install.check_not_installed('base-devel'):
|
||||
Print.warning(
|
||||
f'Unable to install AUR repository: {repository}, base-devel is not installed')
|
||||
|
|
Loading…
Add table
Reference in a new issue