how do I set an environment variable in my .profile file that takes into account if the variable exists and appends to it?
To explain:
I want to do
export ANT_OPTS=-Dparam=value
but if the ANT_OPTS already exists I want to append to it.
I want to do something similar to
set ANT_OPTS=%ANT_OPTS% -Dparam=value
in Windows.
How do I create it or append to it if it already exists?