From a7b9cb6d55a7df04689919d37fbbfe356ebf7a67 Mon Sep 17 00:00:00 2001 From: Tobias Reisinger Date: Tue, 13 Jul 2021 02:05:40 +0200 Subject: [PATCH] Ended friendship with doas --- .config/paru/paru.conf | 6 +++--- .local/bin/archlinux-update | 10 ++-------- .local/bin/edit | 13 +++---------- 3 files changed, 8 insertions(+), 21 deletions(-) diff --git a/.config/paru/paru.conf b/.config/paru/paru.conf index 1ce9b54..0af4ae1 100644 --- a/.config/paru/paru.conf +++ b/.config/paru/paru.conf @@ -5,6 +5,6 @@ BatchInstall = true NewsOnUpgrade = true RemoveMake = yes -[bin] -Sudo = doas -SudoFlags = -- +#[bin] +#Sudo = doas +#SudoFlags = -- diff --git a/.local/bin/archlinux-update b/.local/bin/archlinux-update index 4caf620..9185899 100755 --- a/.local/bin/archlinux-update +++ b/.local/bin/archlinux-update @@ -1,12 +1,6 @@ #!/usr/bin/sh -alias get_priv="sudo" -if [ -x "$(command -v doas)" ] -then - alias get_priv="doas" -fi - -get_priv echo +sudo echo paru -Syu @@ -21,7 +15,7 @@ fi echo "===================================================================" -get_priv checkservices +sudo checkservices if [ $? -eq 0 ]; then echo "CHECKSERVICES SUCCEDEED" diff --git a/.local/bin/edit b/.local/bin/edit index 909b959..eb253aa 100755 --- a/.local/bin/edit +++ b/.local/bin/edit @@ -2,13 +2,6 @@ set -e -priv_cmd="sudo" - -if [ -x "$(command -v doas)" ] -then - priv_cmd="doas --" -fi - edit_directory="$HOME/.cache/edit/" filehash=$(readlink -fn "$1" | md5sum | awk '{ print $1 }') @@ -23,11 +16,11 @@ group=$(id -gn) echo "Editing $1 in $filepath as $user:$group" -$priv_cmd cp "$1" "$filepath" -$priv_cmd chown $user:$group "$filepath" +sudo cp "$1" "$filepath" +sudo chown $user:$group "$filepath" $EDITOR "$filepath" -$priv_cmd cp "$filepath" "$1" +sudo cp "$filepath" "$1" rm "$filepath"