2022-04-14 14:49:10 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
###############################################
|
|
|
|
# Upgrade to mainline #########################
|
|
|
|
|
|
|
|
yes Y | apt update
|
|
|
|
yes Y | apt upgrade
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
###############################################
|
|
|
|
# Parse index.html with latest dev versions ###
|
|
|
|
|
|
|
|
# Here we cut like:
|
|
|
|
# <a href="0.1.0.1653/">0.1.0.1653/</a>
|
|
|
|
# to
|
|
|
|
# 0.1.0.1653
|
|
|
|
|
|
|
|
wget http://storage-url/package-name/dev/
|
|
|
|
recent_develop="$(cat index.html | tail -n 3 | head -n 1 | cut -f 2 -d '>' | cut -f 1 -d '<' | cut -f 1 -d '/')"
|
|
|
|
echo "Actual dev version: $recent_develop"
|
2022-04-14 15:58:26 +02:00
|
|
|
rm *index*
|
2022-04-14 14:49:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
###############################################
|
|
|
|
# Downloading the actual version ##############
|
|
|
|
|
|
|
|
wget http://storage-url/package-name/dev/${recent_develop}/package-name-${recent_develop}-Linux.deb
|
|
|
|
yes Y | dpkg -i *.deb
|
|
|
|
rm *.deb
|
|
|
|
|
|
|
|
|
|
|
|
systemctl restart package-name
|