From 6f7c1abfe7bbf6528219a82dce767f1232b40801 Mon Sep 17 00:00:00 2001 From: tomasohara Date: Thu, 23 Dec 2021 21:55:42 -0600 Subject: [PATCH] adds warning about potential profile loss Issues warning and waits for user before proceeding. --- update.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/update.sh b/update.sh index 6730185..963aa41 100755 --- a/update.sh +++ b/update.sh @@ -1,5 +1,13 @@ #! /bin/bash +function pause-for-enter () { + local message="$1" + if [ "$message" = "" ]; then message="Press enter to continue"; fi + read -p "$message " +} + +pause-for-enter $'Warning: updating might clear profiles, etc.\n\nPress enter to continue.' + cd $(dirname $0) LASTCHANGE_URL="https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2FLAST_CHANGE?alt=media" @@ -28,4 +36,3 @@ unzip $ZIP_FILE popd rm -f ./latest ln -s $REVISION/chrome-linux/ ./latest -