From 791720476956defa7019d8881dc7dd87d36bdf1f Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Mon, 29 May 2023 00:28:16 -0300 Subject: [PATCH] namespaces: move install command under the 'portzap' namespace --- bin/portzap | 4 ++-- libexec/portzap/commands/{install => portzap-install} | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) rename libexec/portzap/commands/{install => portzap-install} (86%) diff --git a/bin/portzap b/bin/portzap index f3a13eb..cd26b56 100755 --- a/bin/portzap +++ b/bin/portzap @@ -12,7 +12,7 @@ clone_mask=007 pull_mask=007 # Commands -. $libexec_dir/commands/install +. $libexec_dir/commands/portzap-install . $libexec_dir/commands/pull . $libexec_dir/commands/clone @@ -33,7 +33,7 @@ case $1 in "install") require_root require_deps git - install $ports_dir $portzap_dir $libexec_dir $portzap_file + portzap_install $ports_dir $portzap_dir $libexec_dir $portzap_file ;; *) echo "Usage: portzap clone|pull|install" diff --git a/libexec/portzap/commands/install b/libexec/portzap/commands/portzap-install similarity index 86% rename from libexec/portzap/commands/install rename to libexec/portzap/commands/portzap-install index b7081ab..bd73bb5 100644 --- a/libexec/portzap/commands/install +++ b/libexec/portzap/commands/portzap-install @@ -1,6 +1,6 @@ #!/bin/sh -__install_update() { +__portzap_install_update() { portzap_file=$1 ports_dir=$2 libexec_dir=$3 @@ -26,7 +26,7 @@ __install_update() { } -__install_ports() { +__portzap_install_ports() { ports_dir=$1 libexec_dir=$2 find -s . -maxdepth 1 -type f \ @@ -40,16 +40,16 @@ __install_ports() { -exec "$libexec_dir/install-directory" "$ports_dir" "$libexec_dir" {} + } -install() { +portzap_install() { ports_dir=$1 portzap_dir=$2 libexec_dir=$3 portzap_file=$4 cd "$portzap_dir" || exit 1 if [ -e "$portzap_file" ]; then - __install_update "$portzap_file" "$ports_dir" "$libexec_dir" + __portzap_install_update "$portzap_file" "$ports_dir" "$libexec_dir" else - __install_ports "$portzap_dir" "$libexec_dir" + __portzap_install_ports "$portzap_dir" "$libexec_dir" fi git rev-parse HEAD > "$portzap_file" }