From 501aa95c7586d7db2ca0ab2f63d308647cf18c60 Mon Sep 17 00:00:00 2001 From: Christoph Date: Tue, 14 May 2019 18:44:54 +0200 Subject: [PATCH] update-dehydrated-repos.sh: hack to prevent echoing password and storing it to bash_history. --- update-dehydrated-repos.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/update-dehydrated-repos.sh b/update-dehydrated-repos.sh index 5f0cf6c..cf98678 100755 --- a/update-dehydrated-repos.sh +++ b/update-dehydrated-repos.sh @@ -224,6 +224,8 @@ fi if [[ ! -d "$REPOSITORY_PATH" ]] ; then info "Repository '$REPOSITORY_NAME' is not present." + read -s dummy1 + read -s dummy2 clean_up 0 fi @@ -244,6 +246,17 @@ fi git pull 2> "$log_file" +if [ -s "$log_file" ]; then + info "$(cat "$log_file")" +else + blank_line + echononl "Updating repository \033[1m$REPOSITORY_NAME\033[m" + echo_done +fi + + +clean_up 0 + blank_line echononl "Updating repository \033[1m$REPOSITORY_NAME\033[m" if [ -s "$log_file" ]; then