Commit a1fb1c89 authored by amette's avatar amette

[FIX] Make setup.sh work with cron (almost)

parent 8ecfc711
......@@ -163,6 +163,7 @@ usage: $0 [<switches>] ${POSSIBLE_COMMANDS}
-p php alternate PHP command (default: php)
-n not prompt for user and group, assume current
-d off|on disable|enable debugging mode (override script default)
-q quiet (workaround to silence composer, e.g. in cron scripts)
There are some other commands recommended for advanced users only.
More documentation about this: https://doc.tiki.org/Permission+Check
......@@ -185,8 +186,9 @@ OPT_AGROUP=
OPT_VIRTUALS=
OPT_PHPCLI=
OPT_USE_CURRENT_USER_GROUP=
OPT_QUIET=
while getopts "hu:g:v:p:nd:" OPTION; do
while getopts "hu:g:v:p:nd:q" OPTION; do
case $OPTION in
h) usage ; exit 0 ;;
u) OPT_AUSER=$OPTARG ;;
......@@ -195,6 +197,7 @@ while getopts "hu:g:v:p:nd:" OPTION; do
p) OPT_PHPCLI=$OPTARG ;;
n) OPT_USE_CURRENT_USER_GROUP=1 ;;
d) set_debug ;;
q) OPT_QUIET="-q" ;;
?) usage ; exit 1 ;;
esac
if [ -n "$OPT_PHPCLI" ]; then
......@@ -522,10 +525,10 @@ composer_core()
else
# todo : if exists php;
if [ ${LOGCOMPOSERFLAG} = "0" ] ; then
"${PHPCLI}" temp/composer.phar self-update
"${PHPCLI}" temp/composer.phar self-update "$OPT_QUIET"
fi
if [ ${LOGCOMPOSERFLAG} = "1" ] ; then
"${PHPCLI}" temp/composer.phar self-update > ${TIKI_COMPOSER_SELF_UPDATE_LOG}
"${PHPCLI}" temp/composer.phar self-update "$OPT_QUIET" > ${TIKI_COMPOSER_SELF_UPDATE_LOG}
fi
fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment