Downgrade Chromium: forever ask to restore backup until y or n given

pull/936/head
Botspot 3 years ago
parent f02b85eee9
commit 3439d2ee2c

@ -22,24 +22,27 @@ if [ ! -z "$(ps aux | grep chromium | grep -v 'grep' )" ];then
fi
if [ -d ~/.config/chromium.bak ];then
read -p "Would you like to restore the backup of Chromium's config folder? [y/n] " answer
if [ "$answer" == y ] || [ "$answer" == Y ];then
echo "Restoring backup..."
while true;do
read -p "Would you like to restore the backup of Chromium's config folder? [y/n] " answer
#first remove existing
if [ -e ~/.config/chromium ];then
gio trash ~/.config/chromium || rm -rf ~/.config/chromium
if [ "$answer" == y ] || [ "$answer" == Y ];then
echo "Restoring backup..."
#first remove existing
if [ -e ~/.config/chromium ];then
gio trash ~/.config/chromium || rm -rf ~/.config/chromium
fi
#then rename the backup folder
mv ~/.config/chromium.bak ~/.config/chromium
break #exit loop
elif [ "$answer" == n ] || [ "$answer" == N ];then
break #exit loop
else
echo "Unknown answer "\""$answer"\"""
fi
#then rename the backup folder
mv ~/.config/chromium.bak ~/.config/chromium
elif [ "$answer" == n ] || [ "$answer" == N ];then
true #do nothing
else
error "Unknown answer "\""$answer"\"""
fi
done
fi
echo "Allowing Chromium to be upgradable..."

Loading…
Cancel
Save