From 86344fa21a5ab779f8f14a2aa5c67594634f29e4 Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Sun, 9 Jan 2022 19:53:43 -0300 Subject: [PATCH] Request user password --- scripts/linkFiles.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/linkFiles.sh b/scripts/linkFiles.sh index 1d24bcf..f17a9ed 100755 --- a/scripts/linkFiles.sh +++ b/scripts/linkFiles.sh @@ -88,7 +88,9 @@ loopThroughFiles() { displayDialogBox --yesno "There are 'other' files, would you like to install them?\n\n${files}" || return fi - sudo bash -c "$(declare -f runDetachedScript); $(declare -f linkFile); runDetachedScript $dialogBox" + password=$(displayDialogBox --password "Enter your password" 3>&1 1>&2 2>&3) + echo $password | sudo -S bash -c "$(declare -f runDetachedScript); $(declare -f linkFile); runDetachedScript $dialogBox" + unset password } runDetachedScript() {