diff --git a/doc/lib-header.txt b/doc/lib-header.txt index 5d8cf28..d3c48f7 100644 --- a/doc/lib-header.txt +++ b/doc/lib-header.txt @@ -3,3 +3,9 @@ [ -d "" ] || { echo "LIBDIR not exist"; exit 1; } #beginn func + + +#this func is standalone executable +[ -n "$1" ] && { + check_user +} diff --git a/src/func/check_update b/src/func/check_update new file mode 100755 index 0000000..7a1847d --- /dev/null +++ b/src/func/check_update @@ -0,0 +1,17 @@ +#!/bin/bash +#remaster lib +[ -d "" ] || { echo "LIBDIR not exist"; exit 1; } + +#check_update +function check_update() { + if curl https://raw.githubusercontent.com/6543/remaster/master/changes/remaster.md | diff - <(zcat /usr/share/doc/remaster/changelog.gz ); then + echo 'REMASTER: Aktuell' + else + echo 'REMASTER: Warning: neue Version verfügbar' + fi +} + +#this func is standalone executable +[ -n "$1" ] && { + check_update +} diff --git a/src/remaster.sh b/src/remaster.sh index 1ae8b6d..60db4c6 100755 --- a/src/remaster.sh +++ b/src/remaster.sh @@ -90,6 +90,8 @@ function main_renew() { check_dependency error_level="$?"; [ "$error_level" != "0" ] && on_exit $error_level >> "$log_file" + check_update | tee -a "$log_file" + [ "$distro" != "" ] && distro="_$distro" # 2. Entpacke ISO @@ -237,6 +239,8 @@ function main_update_pxe() { check_user error_level="$?"; [ "$error_level" != "0" ] && on_exit $error_level >> "$log_file" + check_update | tee -a "$log_file" + check_dependency error_level="$?"; [ "$error_level" != "0" ] && on_exit $error_level >> "$log_file" @@ -357,6 +361,8 @@ function main_update_iso() { check_user error_level="$?"; [ "$error_level" != "0" ] && on_exit $error_level >> "$log_file" + check_update | tee -a "$log_file" + check_dependency error_level="$?"; [ "$error_level" != "0" ] && on_exit $error_level >> "$log_file" @@ -465,11 +471,6 @@ function main_update_iso() { on_exit 0 } -#remaster.sh update -function main_update() { - main_update_pxe -} - ##################################################################################### ################## F u n c t i o n s ################################################ #####################################################################################