From b80073a4c1125ffc6a1cfa0997d3af087189a12c Mon Sep 17 00:00:00 2001 From: nyyu Date: Wed, 19 May 2021 10:30:23 +0200 Subject: [PATCH] shell check --- build.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/build.sh b/build.sh index 57ebeb5..d296b87 100755 --- a/build.sh +++ b/build.sh @@ -1,19 +1,18 @@ #!/bin/bash - pacman -Syu --noconfirm useradd build -m echo 'build ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers -chown -R build:build * +chown -R build:build . for d in */ ; do echo "$d" - cd "$d" - sudo -u build sh -c 'makepkg -s --skippgpcheck --noconfirm' - if [ $? -eq 0 ]; then + cd "$d" || continue + + if sudo -u build sh -c 'makepkg -s --skippgpcheck --noconfirm' ; then for pkg in *.pkg.tar.zst ; do - cp $pkg /repo/ - repo-add /repo/nyyu.db.tar.zst /repo/$pkg + cp "$pkg" /repo/ + repo-add /repo/nyyu.db.tar.zst /repo/"$pkg" done fi cd ..