introduce SUDOE and so debug

This commit is contained in:
xiongdian.me 2023-01-06 02:07:21 +08:00
parent 2e0fd9fa96
commit 27bfcacc07
2 changed files with 4 additions and 2 deletions

View File

@ -32,10 +32,10 @@ install_dependencies()
fmt_note "installing dependencies ..."
case $(get_os_name) in
"ubuntu"|"debian" )
$SUDO "$DOTFILES/tools/ubuntu.sh" apt-install
$SUDOE "$DOTFILES/tools/ubuntu.sh" apt-install
;;
"alpine" )
$SUDO "$DOTFILES/tools/alpine.sh" apk-add
$SUDOE "$DOTFILES/tools/alpine.sh" apk-add
;;
"macos" )
"$DOTFILES/tools/macos.sh" brew-install

View File

@ -126,8 +126,10 @@ setup_color() {
# END of color settings
SUDO=''
SUDOE=''
if [[ "$EUID" != "0" && -x $(command -v sudo) ]]; then
SUDO='sudo'
SUDOE='sudo -E'
fi
ask_for_yN()