|
|
|
@ -23,20 +23,20 @@ if [[ "$(lsb_release -cs)" != "buster" && "$(lsb_release -cs)" != "bullseye" &&
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Wait for apt lock to be released
|
|
|
|
|
i=0
|
|
|
|
|
tput sc
|
|
|
|
|
while fuser /var/lib/dpkg/lock >/dev/null 2>&1 ; do
|
|
|
|
|
case $(($i % 4)) in
|
|
|
|
|
0 ) j="-" ;;
|
|
|
|
|
1 ) j="\\" ;;
|
|
|
|
|
2 ) j="|" ;;
|
|
|
|
|
3 ) j="/" ;;
|
|
|
|
|
esac
|
|
|
|
|
tput rc
|
|
|
|
|
echo -en "\r[$j] Waiting for other software managers to finish..."
|
|
|
|
|
sleep 0.5
|
|
|
|
|
((i=i+1))
|
|
|
|
|
i=0
|
|
|
|
|
while sudo fuser /var/{lib/{dpkg,apt/lists},cache/apt/archives}/lock > /dev/null 2>&1
|
|
|
|
|
do
|
|
|
|
|
case $(($i % 4)) in
|
|
|
|
|
0) j="-";;
|
|
|
|
|
1) j="\\";;
|
|
|
|
|
2) j="|";;
|
|
|
|
|
3) j="/";;
|
|
|
|
|
esac
|
|
|
|
|
printf "\r[$j] Waiting for other package managers to finish..."
|
|
|
|
|
sleep 0.5
|
|
|
|
|
((i+=1))
|
|
|
|
|
done
|
|
|
|
|
[[ $i -gt 0 ]] && printf "Done.\n"
|
|
|
|
|
|
|
|
|
|
# Remove Old Minecraft Pi
|
|
|
|
|
sudo apt-get remove -y minecraft-pi &>/dev/null || true
|
|
|
|
|