Ended friendship with doas
This commit is contained in:
parent
eae6adf1d5
commit
a7b9cb6d55
3 changed files with 8 additions and 21 deletions
|
@ -5,6 +5,6 @@ BatchInstall = true
|
||||||
NewsOnUpgrade = true
|
NewsOnUpgrade = true
|
||||||
RemoveMake = yes
|
RemoveMake = yes
|
||||||
|
|
||||||
[bin]
|
#[bin]
|
||||||
Sudo = doas
|
#Sudo = doas
|
||||||
SudoFlags = --
|
#SudoFlags = --
|
||||||
|
|
|
@ -1,12 +1,6 @@
|
||||||
#!/usr/bin/sh
|
#!/usr/bin/sh
|
||||||
|
|
||||||
alias get_priv="sudo"
|
sudo echo
|
||||||
if [ -x "$(command -v doas)" ]
|
|
||||||
then
|
|
||||||
alias get_priv="doas"
|
|
||||||
fi
|
|
||||||
|
|
||||||
get_priv echo
|
|
||||||
|
|
||||||
paru -Syu
|
paru -Syu
|
||||||
|
|
||||||
|
@ -21,7 +15,7 @@ fi
|
||||||
echo "==================================================================="
|
echo "==================================================================="
|
||||||
|
|
||||||
|
|
||||||
get_priv checkservices
|
sudo checkservices
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "CHECKSERVICES SUCCEDEED"
|
echo "CHECKSERVICES SUCCEDEED"
|
||||||
|
|
|
@ -2,13 +2,6 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
priv_cmd="sudo"
|
|
||||||
|
|
||||||
if [ -x "$(command -v doas)" ]
|
|
||||||
then
|
|
||||||
priv_cmd="doas --"
|
|
||||||
fi
|
|
||||||
|
|
||||||
edit_directory="$HOME/.cache/edit/"
|
edit_directory="$HOME/.cache/edit/"
|
||||||
|
|
||||||
filehash=$(readlink -fn "$1" | md5sum | awk '{ print $1 }')
|
filehash=$(readlink -fn "$1" | md5sum | awk '{ print $1 }')
|
||||||
|
@ -23,11 +16,11 @@ group=$(id -gn)
|
||||||
|
|
||||||
echo "Editing $1 in $filepath as $user:$group"
|
echo "Editing $1 in $filepath as $user:$group"
|
||||||
|
|
||||||
$priv_cmd cp "$1" "$filepath"
|
sudo cp "$1" "$filepath"
|
||||||
$priv_cmd chown $user:$group "$filepath"
|
sudo chown $user:$group "$filepath"
|
||||||
|
|
||||||
$EDITOR "$filepath"
|
$EDITOR "$filepath"
|
||||||
|
|
||||||
$priv_cmd cp "$filepath" "$1"
|
sudo cp "$filepath" "$1"
|
||||||
|
|
||||||
rm "$filepath"
|
rm "$filepath"
|
||||||
|
|
Loading…
Reference in a new issue