From 9dcfe6523e177f6a9a6c97e57d29f751f2178c39 Mon Sep 17 00:00:00 2001 From: xf0r3m Date: Sun, 19 Apr 2026 10:55:58 +0200 Subject: [PATCH] Dostosowanie immudex-upgrade oraz dodanie pliku manuala. --- immudex-upgrade | 41 +++++++++++++++++++++++++++--------- immudex-upgrade.1 | 53 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+), 10 deletions(-) create mode 100644 immudex-upgrade.1 diff --git a/immudex-upgrade b/immudex-upgrade index c1507fa..b9a849d 100755 --- a/immudex-upgrade +++ b/immudex-upgrade @@ -11,18 +11,31 @@ ENDCOLOR="\e[0m"; root="/run/live/medium"; function help() { - echo "immudex-upgrade - script for searching upgrades and upgrade immudex"; - echo "@ 2024 morketsmerke.org"; + echo "Script for searching upgrades and upgrade immudex."; echo "Superuser (root) privileges are required."; + echo; + echo "Usage: immudex-upgrade [--help] [--version] [--check] [--upgrade] [--myversion] [--compilation-date] [--packages-upgradable [--security]]"; + echo; echo "Options:"; - echo " --check - check there are upgrades for immudex"; - echo " --upgrade - upgrade immudex from given source"; - #echo " --myversion - prints images current commit message"; - echo " --myversion - prints image details"; - echo " --compilation-date - prints date of image creation"; - echo " --packages-upgradable [--security] - updates apt (packages) list and"; - echo " prints available to upgrade packages, with --security modificator"; - echo " prints only pacakages from security repository branch"; + echo " --check Check there are upgrades for immudex"; + echo " --upgrade Upgrade immudex from given source"; + echo " --myversion Prints image details"; + echo " --compilation-date Prints date of image creation"; + echo " --packages-upgradable [--security] Updates apt (packages) list and prints available to upgrade packages, with --security modificator prints only pacakages from security repository branch"; + echo " --help Prints this message."; + echo " --version Prints information about version, author and copyrights."; + echo; + echo "Report bugs to "; +} + +function version(){ + echo "immudex-upgrade 1.0"; + echo; + echo "Copyright (C) 2026 morketsmerke.org"; + echo "This is free software; see the source for copying conditions. There is NO"; + echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."; + echo; + echo "Written by xf0r3m."; } if [ $UID -ne 0 ]; then @@ -32,6 +45,13 @@ if [ $UID -ne 0 ]; then fi if [ "$1" ]; then + if [ "$1" = "--help" ]; then + help; + exit 0; + elif [ "$1" = "--version" ]; then + version; + exit 0; + fi if [ "$1" ] && [ "$1" = "--check" ]; then if check_distro_commit; then echo -e "${GREEN}This${ENDCOLOR} is the latest version of immudex"; @@ -123,3 +143,4 @@ else help; exit 1; fi + diff --git a/immudex-upgrade.1 b/immudex-upgrade.1 new file mode 100644 index 0000000..968b67e --- /dev/null +++ b/immudex-upgrade.1 @@ -0,0 +1,53 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. +.TH IMMUDEX-UPGRADE "1" "April 2026" "immudex-upgrade 1.0" "User Commands" +.SH NAME +immudex-upgrade \- immudex upgrade script +.SH SYNOPSIS +.B immudex-upgrade +[\fI\,--help\/\fR] [\fI\,--version\/\fR] [\fI\,--check\/\fR] [\fI\,--upgrade\/\fR] [\fI\,--myversion\/\fR] [\fI\,--compilation-date\/\fR] [\fI\,--packages-upgradable \/\fR[\fI\,--security\/\fR]] +.SH DESCRIPTION +Script for searching upgrades and upgrade immudex. +Superuser (root) privileges are required. +.SH OPTIONS +.TP +\fB\-\-check\fR +Check there are upgrades for immudex +.TP +\fB\-\-upgrade\fR +Upgrade immudex from given source +.TP +\fB\-\-myversion\fR +Prints image details +.TP +\fB\-\-compilation\-date\fR +Prints date of image creation +.TP +\fB\-\-packages\-upgradable\fR [\-\-security] +Updates apt (packages) list and prints available to upgrade packages, with \fB\-\-security\fR modificator prints only pacakages from security repository branch +.TP +\fB\-\-help\fR +Prints this message. +.TP +\fB\-\-version\fR +Prints information about version, author and copyrights. +.SH AUTHOR +Written by xf0r3m. +.SH "REPORTING BUGS" +Report bugs to +.SH COPYRIGHT +Copyright \(co 2026 morketsmerke.org +.br +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +.SH "SEE ALSO" +The full documentation for +.B immudex-upgrade +is maintained as a Texinfo manual. If the +.B info +and +.B immudex-upgrade +programs are properly installed at your site, the command +.IP +.B info immudex-upgrade +.PP +should give you access to the complete manual. -- 2.39.5