test without [
This commit is contained in:
parent
b332b1fc89
commit
ecf5f038dd
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue