From f76410856cb76a4e6cfde6f7309b845cb0b95447 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Fri, 20 Jan 2023 23:39:47 -0300 Subject: [PATCH] Rename variables in bin/portzap --- bin/portzap | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/bin/portzap b/bin/portzap index d8d3b4b..b620444 100755 --- a/bin/portzap +++ b/bin/portzap @@ -5,8 +5,8 @@ ## # Configuration source_url="https://git.hardenedbsd.org/hardenedbsd/ports.git" -transient_dir="/home/_portzap/ports" -rest_dir="/usr/ports/" +portzap_dir="/home/_portzap/ports" +ports_dir="/usr/ports/" libexec_dir=$(realpath $(dirname $0)/../libexec/portzap/) ## @@ -66,14 +66,14 @@ init() { clone() { if has_portzap_access; then - if [ -e "$transient_dir/.git" ]; + if [ -e "$portzap_dir/.git" ]; then - echo "$transient_dir has already been cloned." + echo "$portzap_dir has already been cloned." echo "Run 'portzap pull' instead." exit 1 fi umask $clone_mask - git clone --depth 1 $source_url $transient_dir + git clone --depth 1 $source_url $portzap_dir else echo "Permission denied." fi @@ -82,10 +82,10 @@ clone() { pull() { if has_portzap_access; then - if [ -e "$transient_dir/.git" ]; + if [ -e "$portzap_dir/.git" ]; then umask $pull_mask - cd $transient_dir + cd $portzap_dir git pull --rebase origin hardenedbsd/main else echo "Run 'portzap clone' first." @@ -103,8 +103,8 @@ install() { echo "The install command should be run as root." exit 1 fi - cd $transient_dir - find . -maxdepth 1 -type d -exec $libexec_dir/install-directory {} $rest_dir $libexec_dir \; + cd $portzap_dir + find . -maxdepth 1 -type d -exec $libexec_dir/install-directory {} $ports_dir $libexec_dir \; } case $1 in