made launcehr ab it more verbose by default

This commit is contained in:
Jiri 2021-12-26 12:20:45 +01:00
commit 8ed7ace80f

View file

@ -7,6 +7,15 @@
. /usr/share/java-utils/java-functions
echo $@ | grep -q -e "-verbose"
verbose=$?
function warning() {
if [ $verbose -eq 0 ] ; then
echo ${1} >&2
fi
}
# identify directory tree
JRD=`basename $0`
CONF_HOME=$XDG_CONFIG_HOME
@ -58,7 +67,7 @@ for cpfile in $CP_FILES; do
then
cp $cpfile $PLUGIN_HOME
else
echo "Configuration files were not copied for $FILE_NAME - the existing configuration would be overwritten." >&2
warning "Configuration files were not copied for $FILE_NAME - the existing configuration would be overwritten."
fi
done
@ -69,11 +78,11 @@ if [ -e $AGENT ]
then
if grep -Fxq $AGENT_STRING $CONFIG_FILE
then
echo "Default agent path is already set in $CONFIG_FILE. Skipping agent path setting." >&2
warning "Default agent path is already set in $CONFIG_FILE. Skipping agent path setting."
elif grep -rq $AGENT_PREFIX $CONFIG_FILE
then
RESULT_OF_GREP="$(grep -rq $AGENT_PREFIX $CONFIG_FILE)"
echo "Agent path is already set in $CONFIG_FILE as ${RESULT_OF_GREP}. Skipping agent path setting." >&2
warning "Agent path is already set in $CONFIG_FILE as ${RESULT_OF_GREP}. Skipping agent path setting."
else
echo $AGENT_STRING >> $CONFIG_FILE