Fix shellcheck errors
This commit is contained in:
parent
4aaa685b3d
commit
049f1a5255
3 changed files with 6 additions and 4 deletions
|
@ -43,13 +43,16 @@ require_dependency() {
|
|||
i=1
|
||||
while [ "${i}" -le "$#" ]; do
|
||||
eval "_portzap_option=\$${i}"
|
||||
# shellcheck disable=SC2154
|
||||
if [ "${_portzap_option}" = "-v" ]; then
|
||||
echo $(cat "${rootdir}"/../share/portzap/VERSION)
|
||||
cat "${rootdir}"/../share/portzap/VERSION
|
||||
exit 0
|
||||
fi
|
||||
# shellcheck disable=SC2003
|
||||
i=$(expr "${i}" + 1);
|
||||
done
|
||||
|
||||
|
||||
case $1 in
|
||||
"clone")
|
||||
require_dependency "git doas"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
gitdir=$1
|
||||
installdir=$2
|
||||
revfile=$3
|
||||
libexec=$(dirname $0)
|
||||
libexec=$(dirname "$0")
|
||||
|
||||
##
|
||||
# functions
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
git=/usr/local/bin/git
|
||||
gitdir=$1
|
||||
branch=$2
|
||||
libexec=$(dirname "$0")
|
||||
|
||||
##
|
||||
# functions
|
||||
|
@ -37,7 +36,7 @@ if [ -e "${gitdir}/.git" ]; then
|
|||
set_repository_permissions "${gitdir}"
|
||||
cd "${gitdir}"
|
||||
remote=$("${git}" remote | head -n1)
|
||||
if [ $(git branch --show-current) != "${branch}" ]; then
|
||||
if [ "$(git branch --show-current)" != "${branch}" ]; then
|
||||
change_branch "${remote}" "${branch}"
|
||||
fi
|
||||
set -x
|
||||
|
|
Loading…
Reference in a new issue