mirror of
https://github.com/ItsDrike/dotfiles.git
synced 2024-12-26 13:14:35 +00:00
Ask user before running makepkg on git repo
This commit is contained in:
parent
1cd0451ddf
commit
2cacd9c142
|
@ -2,7 +2,7 @@ import shutil
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from src.util import command
|
from src.util import command
|
||||||
from src.util.user import Print
|
from src.util.user import Print, Input
|
||||||
|
|
||||||
|
|
||||||
class Install:
|
class Install:
|
||||||
|
@ -38,12 +38,11 @@ class Install:
|
||||||
Print.comment(f"Git repository {dir_name} doesn't contain PKGBUILD, only downloaded.")
|
Print.comment(f"Git repository {dir_name} doesn't contain PKGBUILD, only downloaded.")
|
||||||
return
|
return
|
||||||
|
|
||||||
cwd = os.getcwd()
|
if Input.yes_no("Do you wish to run makepkg on the downloaded git repository?"):
|
||||||
print(cwd)
|
cwd = os.getcwd()
|
||||||
|
os.chdir(dir_name)
|
||||||
os.chdir(dir_name)
|
command.execute("makepkg -si")
|
||||||
|
os.chdir(cwd)
|
||||||
command.execute("makepkg -si")
|
shutil.rmtree(dir_name)
|
||||||
|
else:
|
||||||
os.chdir(cwd)
|
command.execute(f"mv {dir_name} home/")
|
||||||
shutil.rmtree(dir_name)
|
|
||||||
|
|
Loading…
Reference in a new issue