Last active
October 29, 2015 15:26
-
-
Save smaknsk/923029d2fc7fb2940283 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function aurinstall() { | |
local PKGNAME | |
echo "install = $@" | |
return | |
for PKGNAME in $@; do | |
echo "Installing ${PKGNAME}..." | |
local PKGDEST=/tmp/makepkg_${PKGNAME} | |
/usr/bin/mkdir ${PKGDEST} | |
cd ${PKGDEST} | |
/usr/bin/curl -s https://aur.archlinux.org/packages/${PKGNAME:0:2}/${PKGNAME}/${PKGNAME}.tar.gz | /usr/bin/tar -zx | |
cd ${PKGNAME} | |
/usr/bin/chown nobody:nobody -R ${PKGDEST} | |
/usr/bin/sudo -u nobody /usr/bin/sh -c "/usr/bin/makepkg -s --noconfirm PKGDEST=${PKGDEST}" &>/dev/null | |
/usr/bin/pacman -U --needed --noconfirm `/usr/bin/find ${PKGDEST}/${PKGNAME}/*pkg.tar.xz` | |
rm -r ${PKGDEST} | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment