1 Commits

Author SHA1 Message Date
f45abae0ce - Add VSL support,
- Fix dry run,
- Support now rx3-base 1.2.0.
2026-09-13 16:57:07 +02:00
3 changed files with 53 additions and 28 deletions

View File

@@ -1,3 +1,13 @@
------------------------------------------------------------------------------------------------------------------------------------
MPM V 1.1.4 - A. GIBERT - 2026/09/13
------------------------------------------------------------------------------------------------------------------------------------
- Add VSL support,
- Fix dry run,
- Support now rx3-base 1.2.0.
------------------------------------------------------------------------------------------------------------------------------------
MPM V 1.1.3 - A. GIBERT - 2026/06/20
------------------------------------------------------------------------------------------------------------------------------------

View File

@@ -24,7 +24,7 @@
%define name mpm
%define version 1.1.3
%define version 1.1.4
%define release %mkrel 1rx3
%global debug_package %{nil}
@@ -160,6 +160,9 @@ done
#-----------------------------------------------------------------------------------------------------------------------------------
%changelog
* Sun Sep 13 2026 Arnaud G. GIBERT <arnaud@rx3.net> - 1.1.4-1rx3.mga9
- Update to 1.1.4
* Sat Jun 20 2026 Arnaud G. GIBERT <arnaud@rx3.net> - 1.1.3-1rx3.mga9
- Update to 1.1.3

View File

@@ -39,17 +39,17 @@
# Global Variables
#-----------------------------------------------------------------------------------------------------------------------------------
declare -g VERSION="1.1.3"
declare -g NAME="mpm"
declare -g HELP="usage: [-h | --help] | [-V | --version] | [-l | --list] | [-i | --install <mpm_name>] [-T | --test] [-v | --verbose] [-r | --repo <repository_url>]"
declare -g VERSION="1.1.4"
declare -g NAME="MPM"
declare -g HELP="usage: [-h | --help] | [-V | --version] | [-l | --list] | [-i | --install <mpm_name>] [-T | --test] [-v | --verbose] [-r | --repo <repository_url>]"
declare -g MODE="DEFAULT"
declare -g VERBOSE="FALSE"
declare -g DRY_RUN="FALSE"
declare -g RETVAL=0
declare -g EXIT_CODE=0
declare -g MODE="DEFAULT"
declare -g VERBOSE="FALSE"
declare -g DRY_RUN="FALSE"
declare -g MPM_REPO="https://www.rx3.net/mpm-repository"
declare -g MPM_NAME=""
declare -g MPM_REPO="https://www.rx3.net/mpm-repository"
declare -g MPM_NAME=""
if [[ -f /etc/mpm.conf ]]
then
@@ -79,9 +79,8 @@ mpm_version_print()
mpm_help_print()
{
mpm_version_print
echo_error "Repository URL: [${MPM_REPO}]"
help_print
echo_error "Repository URL: [${MPM_REPO}]"
}
@@ -107,10 +106,10 @@ mpm_args_parse()
-r|--repo) MPM_REPO="$2"; shift; shift;;
# Mode switches
-h|--help) MODE="EXIT"; mpm_help_print; shift;;
-h|--help) MODE="HELP"; shift;;
-i|--install) MODE="INSTALL"; MPM_NAME="$2"; shift; shift;;
-l|--list) MODE="LIST"; shift;;
-V|--version) MODE="EXIT"; mpm_version_print; shift;;
-V|--version) MODE="VERSION"; shift;;
# Global options
-T|--test) DRY_RUN="TRUE"; shift;;
@@ -118,18 +117,16 @@ mpm_args_parse()
# End of options
--) shift; break;;
*) echo_error "args_parse internal error [$1]!"; exit 1;;
*) echo_error "args_parse internal error [$1]!"; exit 1;;
esac
done
if [[ "${MODE}" == "DEFAULT" ]]
then
MODE="EXIT"
echo_error "Help, Install, List or Version should be invoked!"
mpm_help_print
exit 1
MODE="HELP"
EXIT_CODE=1
fi
}
@@ -145,7 +142,7 @@ mpm_mpkg_list()
{
if [[ "${MPM_REPO}" =~ ^https?:// ]]
then
cmd_exec curl -L "${MPM_REPO}" 2>/dev/null | grep -e '\.mpm</a>' | sed -e 's/.*href="//' -e 's/\.mpm".*//'
cmd_exec FORCE curl -L "${MPM_REPO}" 2>/dev/null | grep -e '\.mpm</a>' | sed -e 's/.*href="//' -e 's/\.mpm".*//'
else
ls "${MPM_REPO}"/*.mpm | sed -e "s%^${MPM_REPO}/%%" -e 's/\.mpm$//'
fi
@@ -167,7 +164,7 @@ mpm_mpkg_tag_read()
if [[ "${MPM_REPO}" =~ ^https?:// ]]
then
cmd_exec curl -L "${MPM_REPO}/${mpkg}.mpm" 2>/dev/null | grep -e "${tag}: " | sed -e "s/^${tag}: //"
cmd_exec FORCE curl -L "${MPM_REPO}/${mpkg}.mpm" 2>/dev/null | grep -e "${tag}: " | sed -e "s/^${tag}: //"
else
grep -e "${tag}: " "${MPM_REPO}/${mpkg}.mpm" 2>/dev/null | sed -e "s/^${tag}: //"
fi
@@ -284,17 +281,31 @@ mpm_install()
# Main
#-----------------------------------------------------------------------------------------------------------------------------------
vsl_add
mpm_args_parse "$@"
case "${MODE}" in
"EXIT")
exit ${EXIT_CODE}
;;
"HELP")
mpm_help_print
exit ${EXIT_CODE}
;;
"VERSION")
mpm_version_print
exit ${EXIT_CODE}
;;
esac
if [[ "${MODE}" == "EXIT" ]]
then
exit 0
fi
echo_error "Mode: [${MODE}] Verbose: [${VERBOSE}] Dry_Run: [${DRY_RUN}] Repo_URL: [${MPM_REPO}]"
case "${MODE}" in
LIST)
mpm_list
@@ -306,8 +317,9 @@ case "${MODE}" in
*)
mpm_help_print
RETVAL=1
EXIT_CODE=1
;;
esac
exit ${RETVAL}
exit ${EXIT_CODE}