mirror of
https://github.com/DictXiong/dotfiles.git
synced 2025-04-24 07:36:53 +08:00
introduce SUDOE and so debug
This commit is contained in:
parent
2e0fd9fa96
commit
27bfcacc07
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user