|
|
@ -69,11 +69,13 @@ elif [ "$1" = 'doupdate' ]; then
|
|
|
|
DEBIAN_FRONTEND='kde' apt-get -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' -o Apt::Color='0' -o Dpkg::Use-Pty='0' -y dist-upgrade |& tee /run/lubuntu-update-apt-log
|
|
|
|
DEBIAN_FRONTEND='kde' apt-get -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' -o Apt::Color='0' -o Dpkg::Use-Pty='0' -y dist-upgrade |& tee /run/lubuntu-update-apt-log
|
|
|
|
|
|
|
|
|
|
|
|
# Find all the conffiles
|
|
|
|
# Find all the conffiles
|
|
|
|
|
|
|
|
doConffiles='y';
|
|
|
|
mapfile conffileRawList <<< "$(grep -P "^Configuration file \'.*\'$" '/run/lubuntu-update-apt-log')"
|
|
|
|
mapfile conffileRawList <<< "$(grep -P "^Configuration file \'.*\'$" '/run/lubuntu-update-apt-log')"
|
|
|
|
if [ "$(echo "${conffileRawList[0]}" | head -c1)" != 'C' ]; then # Empty or invalid list, we're done
|
|
|
|
if [ "$(echo "${conffileRawList[0]}" | head -c1)" != 'C' ]; then # Empty or invalid list, we're done
|
|
|
|
exit 0
|
|
|
|
doConffiles='n';
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$doConffiles" = 'y' ]; then
|
|
|
|
conffileList=()
|
|
|
|
conffileList=()
|
|
|
|
counter=0
|
|
|
|
counter=0
|
|
|
|
while [ "$counter" -lt "${#conffileRawList[@]}" ]; do
|
|
|
|
while [ "$counter" -lt "${#conffileRawList[@]}" ]; do
|
|
|
@ -126,6 +128,7 @@ elif [ "$1" = 'doupdate' ]; then
|
|
|
|
gotCommand='no'
|
|
|
|
gotCommand='no'
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
done
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
echo 'Checking release status...'
|
|
|
|
echo 'Checking release status...'
|
|
|
|
|
|
|
|
|
|
|
@ -133,36 +136,52 @@ elif [ "$1" = 'doupdate' ]; then
|
|
|
|
releaseYear="$(cut -d'.' -f1 <<< "$releaseCode")";
|
|
|
|
releaseYear="$(cut -d'.' -f1 <<< "$releaseCode")";
|
|
|
|
releaseMonth="$(cut -d'.' -f2 <<< "$releaseCode")";
|
|
|
|
releaseMonth="$(cut -d'.' -f2 <<< "$releaseCode")";
|
|
|
|
metaReleaseData="$(curl https://changelogs.ubuntu.com/meta-release)";
|
|
|
|
metaReleaseData="$(curl https://changelogs.ubuntu.com/meta-release)";
|
|
|
|
nextReleaseMonth='';
|
|
|
|
#nextReleaseMonth='';
|
|
|
|
nextReleaseYear='';
|
|
|
|
#nextReleaseYear='';
|
|
|
|
nextLTSReleaseMonth='';
|
|
|
|
#nextLTSReleaseMonth='';
|
|
|
|
nextLTSReleaseYear='';
|
|
|
|
#nextLTSReleaseYear='';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while true; do
|
|
|
|
if ((releaseMonth == 4)); then
|
|
|
|
if ((releaseMonth == 4)); then
|
|
|
|
nextReleaseMonth=((releaseMonth + 6));
|
|
|
|
releaseMonth='10';
|
|
|
|
nextReleaseYear="$releaseYear";
|
|
|
|
|
|
|
|
if (((releaseYear % 2) == 0)); then
|
|
|
|
|
|
|
|
nextLTSReleaseMonth='04';
|
|
|
|
|
|
|
|
nextLTSReleaseYear=((releaseYear + 2));
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
else
|
|
|
|
else
|
|
|
|
nextReleaseMonth="$releaseMonth";
|
|
|
|
releaseMonth='04';
|
|
|
|
nextReleaseYear=((releaseYear + 1));
|
|
|
|
((releaseYear++));
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if isReleaseSupported "$releaseYear" "$releaseMonth" "$metaReleaseData"; then
|
|
|
|
if [ -n "$nextLTSReleaseYear" ]; then
|
|
|
|
|
|
|
|
if isReleaseSupported "$nextLTSReleaseYear" "$nextLTSReleaseMonth" "$metaReleaseData"; then
|
|
|
|
|
|
|
|
echo 'Lubuntu Update !!! NEW RELEASE';
|
|
|
|
echo 'Lubuntu Update !!! NEW RELEASE';
|
|
|
|
echo "$nextLTSReleaseYear.$nextLTSReleaseMonth";
|
|
|
|
echo "$releaseYear.$releaseMonth";
|
|
|
|
fi
|
|
|
|
break;
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
if ! (((nextReleaseYear == nextLTSReleaseYear) && (nextReleaseMonth == nextLTSReleaseMonth))); then
|
|
|
|
# if ((releaseMonth == 4)); then
|
|
|
|
if isReleaseSupported "$nextReleaseYear" "$nextReleaseMonth" "$metaReleaseData"; then
|
|
|
|
# nextReleaseMonth=$((releaseMonth + 6));
|
|
|
|
echo 'Lubuntu Update !!! NEW RELEASE';
|
|
|
|
# nextReleaseYear="$releaseYear";
|
|
|
|
echo "$nextReleaseYear.$nextReleaseMonth";
|
|
|
|
# if (((releaseYear % 2) == 0)); then
|
|
|
|
fi
|
|
|
|
# nextLTSReleaseMonth='04';
|
|
|
|
fi
|
|
|
|
# nextLTSReleaseYear=$((releaseYear + 2));
|
|
|
|
|
|
|
|
# fi
|
|
|
|
|
|
|
|
# else
|
|
|
|
|
|
|
|
# nextReleaseMonth="$releaseMonth";
|
|
|
|
|
|
|
|
# nextReleaseYear=$((releaseYear + 1));
|
|
|
|
|
|
|
|
# fi
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# if [ -n "$nextLTSReleaseYear" ]; then
|
|
|
|
|
|
|
|
# if isReleaseSupported "$nextLTSReleaseYear" "$nextLTSReleaseMonth" "$metaReleaseData"; then
|
|
|
|
|
|
|
|
# echo 'Lubuntu Update !!! NEW RELEASE';
|
|
|
|
|
|
|
|
# echo "$nextLTSReleaseYear.$nextLTSReleaseMonth";
|
|
|
|
|
|
|
|
# fi
|
|
|
|
|
|
|
|
# fi
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# if ! (((nextReleaseYear == nextLTSReleaseYear) && (nextReleaseMonth == nextLTSReleaseMonth))); then
|
|
|
|
|
|
|
|
# if isReleaseSupported "$nextReleaseYear" "$nextReleaseMonth" "$metaReleaseData"; then
|
|
|
|
|
|
|
|
# echo 'Lubuntu Update !!! NEW RELEASE';
|
|
|
|
|
|
|
|
# echo "$nextReleaseYear.$nextReleaseMonth";
|
|
|
|
|
|
|
|
# else
|
|
|
|
|
|
|
|
# echo "Unsupported release: $nextReleaseYear.$nextReleaseMonth";
|
|
|
|
|
|
|
|
# fi
|
|
|
|
|
|
|
|
# fi
|
|
|
|
|
|
|
|
|
|
|
|
echo 'Update installation complete.'
|
|
|
|
echo 'Update installation complete.'
|
|
|
|
elif [ "$1" = 'doReleaseUpgrade' ]; then
|
|
|
|
elif [ "$1" = 'doReleaseUpgrade' ]; then
|
|
|
|