test without [

This commit is contained in:
AJ ONeal 2017-11-06 18:11:05 -07:00
父節點 b332b1fc89
當前提交 ecf5f038dd
共有 2 個檔案被更改,包括 4 行新增4 行删除

查看文件

@ -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