Merge pull request #2 from scoronado12/stefano-tweaks
Add the ability to insert an extra step before installing the package
This commit is contained in:
commit
ded32c3d17
1 changed files with 6 additions and 0 deletions
|
@ -9,10 +9,12 @@ import subprocess
|
|||
parser = ArgumentParser(description="Install AUR packages into a Docker container")
|
||||
parser.add_argument("package_name", type=str, help="name of the AUR package")
|
||||
parser.add_argument("-x", type=str, metavar='EXECUTABLE', help="name of executable")
|
||||
parser.add_argument("-e", type=str, help="add extra step in dockerfile")
|
||||
args = vars(parser.parse_args())
|
||||
|
||||
package_name = args['package_name']
|
||||
command = args['x']
|
||||
edit_flag = args['e']
|
||||
user = getlogin()
|
||||
uid = getuid()
|
||||
gid = getgid()
|
||||
|
@ -40,6 +42,10 @@ RUN git clone https://aur.archlinux.org/yay.git
|
|||
WORKDIR /home/{user}/yay
|
||||
RUN makepkg -si --noconfirm
|
||||
|
||||
#add extra step
|
||||
{"RUN " + edit_flag if edit_flag is not None else ""}
|
||||
|
||||
|
||||
# Now you can play with whatever package you'd like
|
||||
RUN yay -S --noconfirm {package_name}
|
||||
|
||||
|
|
Loading…
Reference in a new issue