From fc53b4f992d72d5a9333bcdc4ad4a2a5acbb9ca0 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Mon, 23 Jan 2023 11:49:17 -0300 Subject: [PATCH] Do not install the ports collection twice Fix #5 --- bin/portzap | 10 +++++++++- libexec/portzap/install-directory | 4 +--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/bin/portzap b/bin/portzap index 4e5ccbf..e6dc211 100755 --- a/bin/portzap +++ b/bin/portzap @@ -103,8 +103,16 @@ install() { echo "The install command should be run as root." exit 1 fi + cd $portzap_dir - find -s . -maxdepth 1 -type d \ + find -s . -maxdepth 1 -type f \ + \( -not -name ".gitignore" \) \ + \( -not -name ".arcconfig" \) \ + -exec $libexec_dir/install-file $ports_dir {} + + find -s . -maxdepth 1 -type d \ + \( -not -name "." \) \ + \( -not -name ".git" \) \ + \( -not -name ".hooks" \) \ -exec $libexec_dir/install-directory $ports_dir $libexec_dir {} + } diff --git a/libexec/portzap/install-directory b/libexec/portzap/install-directory index 0cd8645..b886ac6 100755 --- a/libexec/portzap/install-directory +++ b/libexec/portzap/install-directory @@ -19,7 +19,5 @@ for i in $(seq 3 $#); do # Install subdirs (recursive) find -s $relative_portzap_dir -depth 1 -type d \ - \( -not -name ".git" \) \ - \( -not -name ".hooks" \) \ - -exec $libexec_dir/install-directory $ports_dir $libexec_dir {} \; + -exec $libexec_dir/install-directory $ports_dir $libexec_dir {} \; done