refactor(kiauh.sh): improve kiauh update routine

Signed-off-by: Dominik Willner th33xitus@gmail.com
This commit is contained in:
th33xitus
2022-04-02 12:03:52 +02:00
parent 9761d769e6
commit a2712085d9
5 changed files with 55 additions and 56 deletions

View File

@@ -1,15 +1,3 @@
kiauh_status(){
if [ -d "${SRCDIR}/kiauh/.git" ]; then
cd ${SRCDIR}/kiauh
if git branch -a | grep "* master" -q; then
git fetch -q
if [[ "$(git rev-parse --short=8 origin/master)" != "$(git rev-parse --short=8 HEAD)" ]]; then
KIAUH_UPDATE_AVAIL="true"
fi
fi
fi
}
check_system_updates(){
SYS_UPDATE=$(apt list --upgradeable 2>/dev/null | sed "1d")
if [ ! -z "$SYS_UPDATE" ]; then