diff --git a/DEBIAN/control b/DEBIAN/control index 8580391..e35de60 100644 --- a/DEBIAN/control +++ b/DEBIAN/control @@ -1,6 +1,6 @@ Package: remaster Source: remaster -Version: 2.0.0 +Version: 2.0.2 Architecture: all Maintainer: 6543 <6543@obermui.de> Installed-Size: diff --git a/autogen.sh b/autogen.sh index d9b6286..377d025 100755 --- a/autogen.sh +++ b/autogen.sh @@ -104,6 +104,7 @@ function build-deb() { version="`cat build/DEBIAN/control | grep Version | cut -d " " -f 2`" arch="`cat build/DEBIAN/control | grep Arch | cut -d " " -f 2`" [ -f "release/remaster_"$version"_"$arch".deb" ] && rm "release/remaster_"$version"_"$arch".deb" + mkdir -p release mv -v "build.deb" "release/remaster_"$version"_"$arch".deb" } diff --git a/changes/remaster.md b/changes/remaster.md index a16cdea..eb79d3f 100644 --- a/changes/remaster.md +++ b/changes/remaster.md @@ -12,3 +12,9 @@ * add Doc "Server Bedienung" * split functions * separate config into /etc/remaster/ + +2018-05-13 - 2.0.1 + * Update-Prüfmechanismus #15 + +2018-05-13 - 2.0.2 + * hotfix-2.0.2 ( create release folder if not exist ) 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..9fded8b 100755 --- a/src/remaster.sh +++ b/src/remaster.sh @@ -1,7 +1,7 @@ #!/bin/bash -#@version 2.0.0 +#@version 2.0.2 #@autor 6543@obermui.de -#@date 2018-05-12 +#@date 2018-05-13 #@licence GNUv3 ##################################################################################### @@ -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 ################################################ #####################################################################################