test without [

This commit is contained in:
AJ ONeal 2017-11-06 18:11:05 -07:00
parent b332b1fc89
commit ecf5f038dd
2 changed files with 4 additions and 4 deletions

View File

@ -96,7 +96,7 @@ popd
#
source ./installer/my-root.sh
echo "Pre-installation to $my_app_dir complete, now installing to $my_root/ ..."
if [ type -p tree ]; then
if type -p tree >/dev/null 2>/dev/null; then
#tree -I "node_modules|include|share" $my_app_dir
tree -L 6 -I "include|share|npm" $my_app_dir
else

View File

@ -1,6 +1,6 @@
if [ type -p adduser ]; then
if [ -z "$(cat /etc/passwd | grep $my_app_name)" ]; then
$sudo_cmd adduser --home /opt/$my_app_name --gecos '' --disabled-password $my_app_name
if type -p adduser >/dev/null 2>/dev/null; then
if [ -z "$(cat $my_root/etc/passwd | grep $my_app_name)" ]; then
$sudo_cmd adduser --home $my_root/opt/$my_app_name --gecos '' --disabled-password $my_app_name
fi
my_user=$my_app_name
my_group=$my_app_name