Download PKGBUILD file conveniently to create a package with it

Every now and then I need a PKGBUILD file to create a package for Arch Linux, for example to install it on multiple computers in a LAN.

Let’s take as a random example. For example, one can click on “View PKGBUILD” at mentioned link and then save the displayed content in a PKGBUILD file locally. Alternatively, one can also run git clone –depth 1 This automatically saves the desired file but you have to know the exact link. I don’t like either solution very much.

Today I came across the tool pbget. With this one only needs to know the name of the package to be created. Thus, the command pbget –aur ttf-iosevka-term is sufficient to download the desired PKGBUILD file. It is necessary to use –aur in this case, because ttf-iosevka-term is only available in the AUR and pbget only searches the official package sources by default.

The command should create the directory ttf-iosevka-term and store the PKBUILD file in it. If you change to this directory and run makepkg -crs PKGBUILD -noconfirm the package will be created. Or you can run makepkg -cirs PKGBUILD -noconfirm to also install the package.

By the way, pbget can be found in the AUR.

OSBN | Arch

These articles could also be interesting:
I reserve the right not to activate comments. The activation of comments can also take several days.