From 9c703e40399005cc1feff99e75d4f6fc51791872 Mon Sep 17 00:00:00 2001 From: speedie Date: Sun, 9 Jul 2023 01:04:33 +0200 Subject: [PATCH] Use packr_ prefix --- src/packr | 4 ++-- src/packr_handler | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/packr b/src/packr index 845c949..bbda8ab 100755 --- a/src/packr +++ b/src/packr @@ -45,8 +45,8 @@ die() { main() { load_x "packr_handler" || die "Failed to load handler" - read_args "$@" - check_action + packr_read_args "$@" + packr_check_action } main "$@" diff --git a/src/packr_handler b/src/packr_handler index 38d857a..c4e2679 100755 --- a/src/packr_handler +++ b/src/packr_handler @@ -16,7 +16,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -read_args() { +packr_read_args() { [ -z "$1" ] && die "You must specify an argument." for arg; do case "$1" in @@ -59,7 +59,7 @@ read_args() { done } -print_help() { +packr_print_help() { [ "$exitcode" = "0" ] && output="/dev/stdout" || output="/dev/stderr" cat << EOF >> "$output" - packr: package manager - @@ -81,21 +81,21 @@ EOF exit "$exitcode" } -load_core() { +packr_load_core() { load_x "packr_cfhandler" || die "Failed to load config handler" packr_conf_init || die "Failed to create configuration file" packr_check_vars || die "Configuration file is not proper." } -setup_install() { - load_core +packr_setup_install() { + packr_load_core load_x "packr_inst" || die "Failed to load packr_inst" } -check_action() { +packr_check_action() { case "$action" in - 'Install') setup_install ;; - 'Help') print_help "$exitcode" ;; + 'Install') packr_setup_install ;; + 'Help') packr_print_help "$exitcode" ;; 'Version') printf "%s\n" "$VERSION" ;; esac }