fix sudo password
This commit is contained in:
@@ -27,6 +27,11 @@ set -e
|
|||||||
# Ask for sudo password upfront so subsequent sudo calls don't prompt mid-install
|
# Ask for sudo password upfront so subsequent sudo calls don't prompt mid-install
|
||||||
sudo -v
|
sudo -v
|
||||||
|
|
||||||
|
# Grant passwordless sudo for the duration of the install, revoke on exit
|
||||||
|
echo "$USER ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/99-hampack-install > /dev/null
|
||||||
|
sudo chmod 440 /etc/sudoers.d/99-hampack-install
|
||||||
|
trap "sudo rm -f /etc/sudoers.d/99-hampack-install" EXIT
|
||||||
|
|
||||||
# Ensure git is available before attempting to clone anything
|
# Ensure git is available before attempting to clone anything
|
||||||
if ! command -v git &> /dev/null; then
|
if ! command -v git &> /dev/null; then
|
||||||
echo "Installing git..."
|
echo "Installing git..."
|
||||||
|
|||||||
Reference in New Issue
Block a user