From 103a0b092e9275bd61d850878140782bbdd97f37 Mon Sep 17 00:00:00 2001 From: nyyu Date: Wed, 19 May 2021 11:26:24 +0200 Subject: [PATCH] add aur build --- .drone.yml | 6 +++++- aur.txt | 16 ++++++++++++++++ build.sh | 26 ++++++++++++++++---------- 3 files changed, 37 insertions(+), 11 deletions(-) create mode 100644 aur.txt diff --git a/.drone.yml b/.drone.yml index e2b30ff..92aa5d2 100644 --- a/.drone.yml +++ b/.drone.yml @@ -9,7 +9,11 @@ steps: - name: repo path: /repo commands: - - ./build.sh + - pacman -Syu git --noconfirm + - useradd build -m + - "echo 'build ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers" + - chown -R build:build . + - sudo -u build sh -c './build.sh' volumes: - name: repo diff --git a/aur.txt b/aur.txt new file mode 100644 index 0000000..1c3aab4 --- /dev/null +++ b/aur.txt @@ -0,0 +1,16 @@ +apache-tools +bottom +cpufetch-git +drone-cli +duf +inxi +iprange +megatools +oh-my-zsh-git +ookla-speedtest-bin +pyload-git +python2-pycurl +shellcheck-bin +systemd-boot-pacman-hook +yay +zenpower-dkms diff --git a/build.sh b/build.sh index d296b87..593152f 100755 --- a/build.sh +++ b/build.sh @@ -1,19 +1,25 @@ #!/bin/bash -pacman -Syu --noconfirm -useradd build -m -echo 'build ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers -chown -R build:build . - -for d in */ ; do - echo "$d" - cd "$d" || continue - - if sudo -u build sh -c 'makepkg -s --skippgpcheck --noconfirm' ; then +build() { + if makepkg -s --skippgpcheck --noconfirm ; then for pkg in *.pkg.tar.zst ; do cp "$pkg" /repo/ repo-add /repo/nyyu.db.tar.zst /repo/"$pkg" done fi +} + +for d in */ ; do + echo "$d" + cd "$d" || continue + build cd .. done + +while read -r p; do + echo "$p" + git clone https://aur.archlinux.org/"$p".git || continue + cd "$p" || continue + build + cd .. +done