I'll make a small bet that the value of "$0" in the basename is "-bash"
I base this on the fact that the sequence of commands involves "su -" and then does a "-c" with commands following in a quoted string.
The command that is likely using "basename" is the line:
. $ADMIN_SCRIPTS_HOME/adstpall.sh apps/apps" > /home/applclone/error.txt
Which executes the script in the context of the running shell (which is started via the "-c" option of su), and that makes it an interactive shell (hence the -bash is the value of $0). So the "basename -bash" fails as "-b" is not a valid option...
It appears that the adstpall.sh script is designed to be executed by name, not included in the current context.
I suspect it would work by just dropping the ". " from the command line.