From 3c8697f186135d88a6746d1e646e404d700cc339 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Thu, 18 Apr 2024 20:19:54 -0300 Subject: [PATCH] Add -v switch And move VERSION to share/portzap/VERSION --- bin/portzap | 10 ++++++++++ VERSION => share/portzap/VERSION | 0 2 files changed, 10 insertions(+) rename VERSION => share/portzap/VERSION (100%) diff --git a/bin/portzap b/bin/portzap index 4d2fe53..2f45f37 100755 --- a/bin/portzap +++ b/bin/portzap @@ -40,6 +40,16 @@ require_dependency() { ## # main +i=1 +while [ "${i}" -le "$#" ]; do + eval "_portzap_option=\$${i}" + if [ "${_portzap_option}" = "-v" ]; then + echo $(cat "${rootdir}"/../share/portzap/VERSION) + exit 0 + fi + i=$(expr "${i}" + 1); +done + case $1 in "clone") require_dependency "git doas" diff --git a/VERSION b/share/portzap/VERSION similarity index 100% rename from VERSION rename to share/portzap/VERSION