Update file provision.sh
This commit is contained in:
parent
a2b449817b
commit
7e152b0159
1 changed files with 9 additions and 9 deletions
|
@ -8,15 +8,6 @@
|
|||
# ~/.local/share/chezmoi. Finally, it begins the TUI experience by displaying styled documentation, prompts, and finishes
|
||||
# by calling the appropriate Chezmoi commands.
|
||||
|
||||
### Prompt for sudo password and (optionally) enable passwordless sudo
|
||||
sudo -n true || SUDO_EXIT_CODE=$?
|
||||
if [ -n "$SUDO_EXIT_CODE" ]; then
|
||||
logg info 'Your user will temporarily be granted passwordless sudo for the duration of the script'
|
||||
logg info 'Press `CTRL+C` to bypass this prompt. You will either enter your password when needed or perform a non-privileged installation'
|
||||
logg info 'Note: Non-privileged installations are not yet supported - pull requests welcome'
|
||||
echo "$(whoami) ALL=(ALL:ALL) NOPASSWD: ALL # TEMPORARY FOR INSTALL DOCTOR" | sudo tee -a /etc/sudoers
|
||||
fi
|
||||
|
||||
### Ensure ~/.local/share/megabyte-labs is a directory
|
||||
if [ ! -d "${XDG_DATA_DIR:-$HOME/.local/share}/megabyte-labs" ]; then
|
||||
mkdir -p "${XDG_DATA_DIR:-$HOME/.local/share}/megabyte-labs"
|
||||
|
@ -189,6 +180,15 @@ logg() {
|
|||
fi
|
||||
}
|
||||
|
||||
### Prompt for sudo password and (optionally) enable passwordless sudo
|
||||
sudo -n true || SUDO_EXIT_CODE=$?
|
||||
if [ -n "$SUDO_EXIT_CODE" ]; then
|
||||
logg info 'Your user will temporarily be granted passwordless sudo for the duration of the script'
|
||||
logg info 'Press `CTRL+C` to bypass this prompt. You will either enter your password when needed or perform a non-privileged installation'
|
||||
logg info 'Note: Non-privileged installations are not yet supported - pull requests welcome'
|
||||
echo "$(whoami) ALL=(ALL:ALL) NOPASSWD: ALL # TEMPORARY FOR INSTALL DOCTOR" | sudo tee -a /etc/sudoers
|
||||
fi
|
||||
|
||||
### Qubes dom0
|
||||
if command -v qubesctl > /dev/null; then
|
||||
# The VM name that will manage the Ansible provisioning (for Qubes dom0)
|
||||
|
|
Loading…
Reference in a new issue