mirror of
https://github.com/DictXiong/dotfiles.git
synced 2025-04-24 11:07:00 +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 ..."
|
fmt_note "installing dependencies ..."
|
||||||
case $(get_os_name) in
|
case $(get_os_name) in
|
||||||
"ubuntu"|"debian" )
|
"ubuntu"|"debian" )
|
||||||
$SUDO "$DOTFILES/tools/ubuntu.sh" apt-install
|
$SUDOE "$DOTFILES/tools/ubuntu.sh" apt-install
|
||||||
;;
|
;;
|
||||||
"alpine" )
|
"alpine" )
|
||||||
$SUDO "$DOTFILES/tools/alpine.sh" apk-add
|
$SUDOE "$DOTFILES/tools/alpine.sh" apk-add
|
||||||
;;
|
;;
|
||||||
"macos" )
|
"macos" )
|
||||||
"$DOTFILES/tools/macos.sh" brew-install
|
"$DOTFILES/tools/macos.sh" brew-install
|
||||||
|
|
|
@ -126,8 +126,10 @@ setup_color() {
|
||||||
# END of color settings
|
# END of color settings
|
||||||
|
|
||||||
SUDO=''
|
SUDO=''
|
||||||
|
SUDOE=''
|
||||||
if [[ "$EUID" != "0" && -x $(command -v sudo) ]]; then
|
if [[ "$EUID" != "0" && -x $(command -v sudo) ]]; then
|
||||||
SUDO='sudo'
|
SUDO='sudo'
|
||||||
|
SUDOE='sudo -E'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ask_for_yN()
|
ask_for_yN()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user