From 2844a5b7bfa0e6b060ffda666f6099d8e5220daf Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 5 Nov 2017 02:40:37 -0500 Subject: better way to install yaourt --- modules/package/manifests/makepkg.pp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 modules/package/manifests/makepkg.pp (limited to 'modules/package') diff --git a/modules/package/manifests/makepkg.pp b/modules/package/manifests/makepkg.pp new file mode 100644 index 0000000..adb7af9 --- /dev/null +++ b/modules/package/manifests/makepkg.pp @@ -0,0 +1,21 @@ +define package::makepkg(extra_options=[]) { + $extra_cmdline = join($extra_options, ' ') + + exec { "install $name": + command => " + mkdir -p /tmp/makepkg + cd /tmp/makepkg + rm -rf '$name' + su doy -c 'git clone https://aur.archlinux.org/$name.git' + cd '$name' + su doy -c makepkg + pacman -U --noconfirm --needed $extra_cmdline $name-*.pkg.tar.xz + ", + unless => "pacman -Q $name > /dev/null 2>&1", + require => [ + Tozt::User["doy"], + Package["git"], + Package["pkg-config"], + ]; + } +} -- cgit v1.2.3-54-g00ecf