From d609d0ac670a11fb9cdd534587479c0ba45b2e9f Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Mon, 28 Feb 2022 18:26:10 -0300 Subject: [PATCH] Add flags --- pkgbuild.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgbuild.sh b/pkgbuild.sh index 913cad1..e69e67e 100755 --- a/pkgbuild.sh +++ b/pkgbuild.sh @@ -9,6 +9,7 @@ visudo -c chmod -R a+rw . baseDir="$PWD" +# [ -n "$INPUT_PKGDIR" ] && inBaseDir=true || inBaseDir=false cd "${INPUT_PKGDIR:-.}" oldFiles=$(find -H "$PWD") @@ -16,12 +17,14 @@ sudo -u nobody makepkg -s --noconfirm sudo -u nobody makepkg --printsrcinfo > .SRCINFO echo "::set-output name=srcInfo::.SRCINFO" -sudo mv .SRCINFO /github/workspace +# [ $inBaseDir = false ] && mv .SRCINFO /github/workspace +mv -f .SRCINFO /github/workspace pkgFile=$(sudo -u nobody makepkg --packagelist) relPkgFile="$(realpath --relative-base="$baseDir" "$pkgFile")" echo "::set-output name=pkgFile::$relPkgFile" -sudo mv "$pkgFile" /github/workspace +# [ $inBaseDir = false ] && mv "$pkgFile" /github/workspace +mv -f "$pkgFile" /github/workspace newFiles=$(find -H "$PWD") toRemove=$(printf '%s\n%s\n' "$newFiles" "$oldFiles" | sort | uniq -u)