Benutzer-Werkzeuge

Webseiten-Werkzeuge


klsapps.sh

Ein Shellscript das mit Hilfe von kdialog eine grafische Dialogbox im KDE, mit den Versionen von Apps anzeigt die ich am Smartphone manuell installiert habe. Die Kommandozeilentools html2text und curl müssen am System installiert sein damit das Script funktioniert. Die Versionen werden mit einer Abfrage direkt aus dem AppStore APKpure ermittelt.

kdialog klsapps.sh

klsapps.sh
#!/bin/bash
#
# Version: 20230220
#
#
#######################
#  Variablenbelegung
#######################
#
SCRIPT_VERSION="20230220"
SCRIPT_NAME=$(basename $0)
START_TIME=$(date +%s)
#
URL_RELEASE_IPWIDGET="https://apkpure.com/de/ip-widget/de.dieterthiess.ipwidget"
URL_RELEASE_VICARE="https://apkpure.com/de/vicare/com.viessmann.vicare"
URL_RELEASE_WIRE="https://apkpure.com/de/wire-%E2%80%A2-secure-messenger/com.wire"
#
#
STORE_IPWIDGET=$(echo $URL_RELEASE_IPWIDGET | awk -F"/" '{print $3}')
STORE_VICARE=$(echo $URL_RELEASE_VICARE | awk -F"/" '{print $3}')
STORE_WIRE=$(echo $URL_RELEASE_WIRE | awk -F"/" '{print $3}')
#
#
VERSION_RELEASE_IPWIDGET=$(elinks $URL_RELEASE_IPWIDGET | egrep -A2 "Was ist neu in der neuesten Version" | head -1 | cut -d" " -f10)
VERSION_RELEASE_VICARE=$(elinks $URL_RELEASE_VICARE | egrep -A2 "Was ist neu in der neuesten Version" | head -1 | cut -d" " -f10)
VERSION_RELEASE_WIRE=$(elinks $URL_RELEASE_WIRE | egrep -A2 "Was ist neu in der neuesten Version" | head -1 | cut -d" " -f10)
#
#
DATE_RELEASE_IPWIDGET=$(elinks $URL_RELEASE_IPWIDGET | egrep -A2 "Aktualisiert am" | tail -1 | awk '{print $1,$2,$3}' | sed 's/,//g')
DATE_RELEASE_VICARE=$(elinks $URL_RELEASE_VICARE | egrep -A2 "Aktualisiert am" | tail -1 | awk '{print $1,$2,$3}' | sed 's/,//g')
DATE_RELEASE_WIRE=$(elinks $URL_RELEASE_WIRE | egrep -A2 "Aktualisiert am" | tail -1 | awk '{print $1,$2,$3}' | sed 's/,//g')
#
#
if [ "$DATE_RELEASE_IPWIDGET" ]
	then
	STRING_MONTH=$(echo $DATE_RELEASE_IPWIDGET | awk -F" " '{print $1}')
		if [ "$STRING_MONTH" = "Jan" ]
		then
		STRING_MONTH="01"
	elif [ "$STRING_MONTH" = "Feb" ]
		then
		STRING_MONTH="02"
	elif [ "$STRING_MONTH" = "Mar" ]
		then
		STRING_MONTH="03"
	elif [ "$STRING_MONTH" = "Apr" ]
		then
		STRING_MONTH="04"
	elif [ "$STRING_MONTH" = "May" ]
		then
		STRING_MONTH="05"
	elif [ "$STRING_MONTH" = "Jun" ]
		then
		STRING_MONTH="06"	
	elif [ "$STRING_MONTH" = "Jul" ]
		then
		STRING_MONTH="07"
	elif [ "$STRING_MONTH" = "Aug" ]
		then
		STRING_MONTH="08"
	elif [ "$STRING_MONTH" = "Sep" ]
		then
		STRING_MONTH="09"
	elif [ "$STRING_MONTH" = "Oct" ]
		then
		STRING_MONTH="10"
	elif [ "$STRING_MONTH" = "Nov" ]
		then
		STRING_MONTH="11"
	elif [ "$STRING_MONTH" = "Dec" ]
		then
		STRING_MONTH="12"
	fi
	STRING_DAY=$(echo $DATE_RELEASE_IPWIDGET | awk -F" " '{print $2}')
	STRING_YEAR=$(echo $DATE_RELEASE_IPWIDGET | awk -F" " '{print $3}')
	DATE_RELEASE_IPWIDGET="$STRING_DAY.$STRING_MONTH.$STRING_YEAR"
fi
 
if [ "$DATE_RELEASE_WIRE" ]
	then
	STRING_MONTH=$(echo $DATE_RELEASE_WIRE | awk -F" " '{print $1}')
	if [ "$STRING_MONTH" = "Jan" ]
		then
		STRING_MONTH="01"
	elif [ "$STRING_MONTH" = "Feb" ]
		then
		STRING_MONTH="02"
	elif [ "$STRING_MONTH" = "Mar" ]
		then
		STRING_MONTH="03"
	elif [ "$STRING_MONTH" = "Apr" ]
		then
		STRING_MONTH="04"
	elif [ "$STRING_MONTH" = "May" ]
		then
		STRING_MONTH="05"
	elif [ "$STRING_MONTH" = "Jun" ]
		then
		STRING_MONTH="06"	
	elif [ "$STRING_MONTH" = "Jul" ]
		then
		STRING_MONTH="07"
	elif [ "$STRING_MONTH" = "Aug" ]
		then
		STRING_MONTH="08"
	elif [ "$STRING_MONTH" = "Sep" ]
		then
		STRING_MONTH="09"
	elif [ "$STRING_MONTH" = "Oct" ]
		then
		STRING_MONTH="10"
	elif [ "$STRING_MONTH" = "Nov" ]
		then
		STRING_MONTH="11"
	elif [ "$STRING_MONTH" = "Dec" ]
		then
		STRING_MONTH="12"
	fi
	STRING_DAY=$(echo $DATE_RELEASE_WIRE | awk -F" " '{print $2}')
	STRING_YEAR=$(echo $DATE_RELEASE_WIRE | awk -F" " '{print $3}')
	DATE_RELEASE_WIRE="$STRING_DAY.$STRING_MONTH.$STRING_YEAR"
fi
 
if [ "$DATE_RELEASE_VICARE" ]
	then
	STRING_MONTH=$(echo $DATE_RELEASE_VICARE | awk -F" " '{print $1}')
	if [ "$STRING_MONTH" = "Jan" ]
		then
		STRING_MONTH="01"
	elif [ "$STRING_MONTH" = "Feb" ]
		then
		STRING_MONTH="02"
	elif [ "$STRING_MONTH" = "Mar" ]
		then
		STRING_MONTH="03"
	elif [ "$STRING_MONTH" = "Apr" ]
		then
		STRING_MONTH="04"
	elif [ "$STRING_MONTH" = "May" ]
		then
		STRING_MONTH="05"
	elif [ "$STRING_MONTH" = "Jun" ]
		then
		STRING_MONTH="06"	
	elif [ "$STRING_MONTH" = "Jul" ]
		then
		STRING_MONTH="07"
	elif [ "$STRING_MONTH" = "Aug" ]
		then
		STRING_MONTH="08"
	elif [ "$STRING_MONTH" = "Sep" ]
		then
		STRING_MONTH="09"
	elif [ "$STRING_MONTH" = "Oct" ]
		then
		STRING_MONTH="10"
	elif [ "$STRING_MONTH" = "Nov" ]
		then
		STRING_MONTH="11"
	elif [ "$STRING_MONTH" = "Dec" ]
		then
		STRING_MONTH="12"
	fi
	STRING_DAY=$(echo $DATE_RELEASE_VICARE | awk -F" " '{print $2}')
	STRING_YEAR=$(echo $DATE_RELEASE_VICARE | awk -F" " '{print $3}')
	DATE_RELEASE_VICARE="$STRING_DAY.$STRING_MONTH.$STRING_YEAR"
fi
 
END_TIME=$(date +%s)
RUN_TIME=$(($END_TIME - $START_TIME))
 
#
#
##################
#  Hauptprogramm
##################
#
#
kdialog --title "Versionsübersicht manuell installierter Android Apps" --detailedsorry "
<pre>App Name		AppStore			Version		Datum</pre>
<hr>
<pre>IP Widget		$STORE_IPWIDGET		$VERSION_RELEASE_IPWIDGET	$DATE_RELEASE_IPWIDGET</pre>
<pre>Vicare		$STORE_VICARE		$VERSION_RELEASE_VICARE	$DATE_RELEASE_VICARE</pre>
<pre>Wire Messenger	$STORE_WIRE		$VERSION_RELEASE_WIRE	$DATE_RELEASE_WIRE</pre>
<hr>
Quellen-URLs der oben aufgeführten Apps siehe unter Details.<br><br>" "Scriptname: $SCRIPT_NAME
Version: $SCRIPT_VERSION
Laufzeit: $RUN_TIME sec
 
Apps aus dem Google Playstore sind über den alternativen Aurora Store zu beziehen. Die Installation der App Aurora Store ist über den Opensource AppStore F-Droid möglich.
 
$URL_RELEASE_IPWIDGET
$URL_RELEASE_VICARE
$URL_RELEASE_WIRE
"
#
#EOF
klsapps.sh.txt · Zuletzt geändert: 2023/02/20 14:34 von dwadmin