Use home directory

This commit is contained in:
Santiago Lo Coco 2022-03-01 13:07:03 -03:00
parent aeb7bc193f
commit 2702bf8bf2
1 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ installAurDeps() {
importPrivateKey() {
echo "$gpgPrivateKey" > private.key
gpgFlags=("--batch" "--pinentry-mode" "loopback" "--passphrase")
sudo -u nobody gpg "${gpgFlags[@]}" "$gpgPassphrase" --import private.key
sudo -Hu nobody gpg "${gpgFlags[@]}" "$gpgPassphrase" --import private.key
rm private.key
sedCommand="gpg ${gpgFlags[*]} \"$gpgPassphrase\""
makepkgSigFile="/usr/share/makepkg/integrity/generate_signature.sh"
@ -44,7 +44,7 @@ importPrivateKey() {
buildPackage() {
if [ -n "$gpgPrivateKey" ] && [ -n "$gpgPublicKey" ]; then
importPrivateKey
sudo -u nobody makepkg -s --sign --key "$gpgPublicKey" --noconfirm
sudo -Hu nobody makepkg -s --sign --key "$gpgPublicKey" --noconfirm
else
sudo -u nobody makepkg -s --noconfirm
fi