Fix shellcheck errors (includes a bug in setup-user)
This commit is contained in:
parent
bf7cc3627e
commit
eca5d5585d
10 changed files with 11 additions and 2 deletions
2
Makefile
2
Makefile
|
@ -17,4 +17,4 @@ deinstall:
|
||||||
rm -rf $(SHAREDIR)
|
rm -rf $(SHAREDIR)
|
||||||
|
|
||||||
shellcheck:
|
shellcheck:
|
||||||
find bin/ libexec/ -type f -exec shellcheck "{}" \;
|
find bin/ libexec/ -type f -exec shellcheck -x "{}" \;
|
||||||
|
|
|
@ -13,6 +13,7 @@ revfile="${installdir}"/.portzap
|
||||||
|
|
||||||
##
|
##
|
||||||
# functions
|
# functions
|
||||||
|
# shellcheck source=/dev/null
|
||||||
. "${libexec}"/functions/print.sh
|
. "${libexec}"/functions/print.sh
|
||||||
|
|
||||||
require_dependency()
|
require_dependency()
|
||||||
|
|
|
@ -8,6 +8,7 @@ libexec="${localbase}"/libexec/portzap
|
||||||
|
|
||||||
##
|
##
|
||||||
# functions
|
# functions
|
||||||
|
# shellcheck source=/dev/null
|
||||||
. "${libexec}"/functions/print.sh
|
. "${libexec}"/functions/print.sh
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
|
@ -11,6 +11,7 @@ branch=$2
|
||||||
|
|
||||||
##
|
##
|
||||||
# functions
|
# functions
|
||||||
|
# shellcheck source=/dev/null
|
||||||
. "${libexec}"/functions/print.sh
|
. "${libexec}"/functions/print.sh
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
|
@ -12,6 +12,7 @@ branch=$3
|
||||||
|
|
||||||
##
|
##
|
||||||
# functions
|
# functions
|
||||||
|
# shellcheck source=/dev/null
|
||||||
. "${libexec}"/functions/print.sh
|
. "${libexec}"/functions/print.sh
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
|
@ -13,6 +13,7 @@ revfile=$3
|
||||||
|
|
||||||
##
|
##
|
||||||
# functions
|
# functions
|
||||||
|
# shellcheck source=/dev/null
|
||||||
. "${libexec}"/functions/print.sh
|
. "${libexec}"/functions/print.sh
|
||||||
|
|
||||||
perform_update()
|
perform_update()
|
||||||
|
|
|
@ -10,6 +10,7 @@ gitdir=$1
|
||||||
|
|
||||||
##
|
##
|
||||||
# functions
|
# functions
|
||||||
|
# shellcheck source=/dev/null
|
||||||
. "${libexec}"/functions/print.sh
|
. "${libexec}"/functions/print.sh
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
|
@ -10,6 +10,7 @@ installdir=$2
|
||||||
|
|
||||||
##
|
##
|
||||||
# functions
|
# functions
|
||||||
|
# shellcheck source=/dev/null
|
||||||
. "${libexec}"/functions/print.sh
|
. "${libexec}"/functions/print.sh
|
||||||
|
|
||||||
erase()
|
erase()
|
||||||
|
|
|
@ -9,6 +9,7 @@ sharedir="${localbase}"/share/portzap
|
||||||
|
|
||||||
##
|
##
|
||||||
# functions
|
# functions
|
||||||
|
# shellcheck source=/dev/null
|
||||||
. "${libexec}"/functions/print.sh
|
. "${libexec}"/functions/print.sh
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
|
@ -9,6 +9,7 @@ user="_portzap"
|
||||||
|
|
||||||
##
|
##
|
||||||
# functions
|
# functions
|
||||||
|
# shellcheck source=/dev/null
|
||||||
. "${libexec}"/functions/print.sh
|
. "${libexec}"/functions/print.sh
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -16,7 +17,7 @@ user="_portzap"
|
||||||
if id -u "${user}" > /dev/null 2>&1; then
|
if id -u "${user}" > /dev/null 2>&1; then
|
||||||
printok "${user} user exists"
|
printok "${user} user exists"
|
||||||
else
|
else
|
||||||
pw useradd
|
pw useradd \
|
||||||
-n "${user}" \
|
-n "${user}" \
|
||||||
-c "portzap user" \
|
-c "portzap user" \
|
||||||
-m \
|
-m \
|
||||||
|
|
Loading…
Reference in a new issue