Add 'indexparser.sh'
This commit is contained in:
parent
a1b0ce3ed6
commit
680d83c8f9
|
@ -0,0 +1,33 @@
|
||||||
|
#!/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"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
###############################################
|
||||||
|
# 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
|
Loading…
Reference in New Issue