The error pointed by you probably is on the line
while [ $newdusage -eq $dusage ]
This line expects compare 2 numbers. If one of these variables is not numeric because any error occured before, you will have this message. I believe the following line is in error
dirName=$`ls $_APP_SRV_DEPL_HOME/ | cut -f1`
The dollar sign ("$") just after the equal sign appears to me in excess. If this is the error, you would not have a valid dirName and, by consequence would not have a proper initialization of the variables used in test ("['). By the way the "left square bracket" is a link to /usr/bin/test. To understand how it works, enter "man test".
I'm tweaking with your commands a little. It appears that it may work only if you have just one file in this directory. If one more is left in this directory you will have a mess on standard error and will measure just the size of the first file. That dollar sign will be pre-pended in the first file name, resulting in nothing to be checked by test, which is the reason of the error.
If you for sure wants to evaluate the size of the directory, you just needs to run "du -s" against the directory, forgetting the files. This code would be like
dusage=`du -s $_APP_SRV_DEPL_HOME | cut -f1`
newdusage=`du -s $_APP_SRV_DEPL_HOME | cut -f1`
Don't forget the second line happens 2 times.