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:
Brandon Rozek 2020-01-02 22:33:06 -05:00 committed by GitHub
commit ded32c3d17
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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}