summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Butler2018-01-29 23:56:23 +0000
committerAlex Butler2018-01-29 23:56:23 +0000
commitf5d75eaf54e961f86f98ff4b818f639cf2af9f18 (patch)
tree967d1eb23a2f59c317b13acc28dcc5cef47c5cf8
parentac665f1f86cc5a1581cf0f89c4d028831cdfcfd4 (diff)
downloadaur-f5d75eaf54e961f86f98ff4b818f639cf2af9f18.tar.gz
0.1-2: Only make a single backup during install
-rw-r--r--aurto.install4
1 files changed, 3 insertions, 1 deletions
diff --git a/aurto.install b/aurto.install
index 5f113d10dd89..ea3c4bc6e141 100644
--- a/aurto.install
+++ b/aurto.install
@@ -27,7 +27,9 @@ post_install() {
sudo -u "$user" repo-add /var/cache/pacman/aurto/aurto.db.tar 2>/dev/null
echo 'aurto: Adding passwordless use of arch-nspawn, mkarchroot, makechrootpkg, aurbuild_chroot' >&2
- cp /etc/sudoers /etc/sudoers.aurto-backup
+ if ! test -f /etc/sudoers.aurto-backup; then
+ cp /etc/sudoers /etc/sudoers.aurto-backup
+ fi
echo "## aurto rules
%$user ALL=(ALL) NOPASSWD: /usr/bin/arch-nspawn
%$user ALL=(ALL) NOPASSWD:SETENV: /usr/bin/makechrootpkg