From ec0fa2f93ea93b6fca78ec58d4ff63e15472a9d1 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Sun, 21 Jul 2024 21:04:44 -0300 Subject: [PATCH] Remove "set -x" --- libexec/portzap/commands/portzap-checkout | 2 -- libexec/portzap/commands/portzap-clone | 11 ++++------- libexec/portzap/commands/portzap-install | 6 +----- libexec/portzap/commands/portzap-pull | 6 ++---- libexec/portzap/utils/{gitexec => git} | 0 share/portzap/RELNOTES | 4 ++++ 6 files changed, 11 insertions(+), 18 deletions(-) rename libexec/portzap/utils/{gitexec => git} (100%) create mode 100644 share/portzap/RELNOTES diff --git a/libexec/portzap/commands/portzap-checkout b/libexec/portzap/commands/portzap-checkout index 53066c5..80b0ea9 100644 --- a/libexec/portzap/commands/portzap-checkout +++ b/libexec/portzap/commands/portzap-checkout @@ -40,10 +40,8 @@ if [ ! -e "${gitdir}/.git" ]; then exit 1 fi -set -x cd "${gitdir}" gitexec "fetch origin" gitexec "checkout ${branch}" || gitexec "checkout -t origin/${branch}" -set +x printok "${branch} checked out" diff --git a/libexec/portzap/commands/portzap-clone b/libexec/portzap/commands/portzap-clone index 222ef5f..5ec255e 100755 --- a/libexec/portzap/commands/portzap-clone +++ b/libexec/portzap/commands/portzap-clone @@ -11,7 +11,7 @@ branch=$3 ## # functions -gitexec() +git() { "${libexec}"/utils/gitexec "${1}" } @@ -41,11 +41,8 @@ if [ -e "${gitdir}/.git" ]; then exit 1 fi -set -x -gitexec "clone ${giturl} ${gitdir}" +git clone "${giturl}" "${gitdir}" cd "${gitdir}" -gitexec "config core.filemode off" -set +x -set +e -gitexec "checkout -t origin/${branch} > /dev/null 2>&1" +git config core.filemode off +git checkout -t origin/"${branch}" printok "clone complete" diff --git a/libexec/portzap/commands/portzap-install b/libexec/portzap/commands/portzap-install index cb34a50..2160c79 100755 --- a/libexec/portzap/commands/portzap-install +++ b/libexec/portzap/commands/portzap-install @@ -49,8 +49,7 @@ perform_install() ! -name ".hooks" \ ! -name ".arcconfig" \ -exec cp -Rpv {} "${installdir}" \; - set -x - chown -R root "${installdir}" + chown -Rv root "${installdir}" } run_install() @@ -73,10 +72,8 @@ if [ "$(id -u)" != "0" ]; then exit 1 fi -set -x umask ${mode} cd "${gitdir}" -set +x run_install "-d" "${installdir}" chmod ${mode} "${installdir}" if [ -e "${revfile}" ]; then @@ -85,5 +82,4 @@ else perform_install fi "${libexec}"/utils/git-rev "${gitdir}" > "${revfile}" -set +x printok "install complete" diff --git a/libexec/portzap/commands/portzap-pull b/libexec/portzap/commands/portzap-pull index a627b28..9bd7786 100755 --- a/libexec/portzap/commands/portzap-pull +++ b/libexec/portzap/commands/portzap-pull @@ -9,9 +9,9 @@ gitdir=$1 ## # functions -gitexec() +git() { - "${libexec}"/utils/gitexec "${1}" + "${libexec}"/utils/git "${@}" } printok() { @@ -39,9 +39,7 @@ if [ ! -e "${gitdir}/.git" ]; then exit 1 fi -set -x cd "${gitdir}" branch=$(gitexec "branch --show-current") gitexec "pull --rebase origin ${branch}" -set +x printok "pull complete" diff --git a/libexec/portzap/utils/gitexec b/libexec/portzap/utils/git similarity index 100% rename from libexec/portzap/utils/gitexec rename to libexec/portzap/utils/git diff --git a/share/portzap/RELNOTES b/share/portzap/RELNOTES new file mode 100644 index 0000000..e4b1a0e --- /dev/null +++ b/share/portzap/RELNOTES @@ -0,0 +1,4 @@ +v?.?.? + +| Remove "set -x" + After this change, portzap emits less output