Author: samindaw
Date: Thu Jun 28 18:11:24 2012
New Revision: 1355093
URL: http://svn.apache.org/viewvc?rev=1355093&view=rev
Log:
updating the script to allow dir creation when single file copy if the dir is not available
Modified:
incubator/airavata/trunk/tools/setup_tomcat.sh
Modified: incubator/airavata/trunk/tools/setup_tomcat.sh
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/tools/setup_tomcat.sh?rev=1355093&r1=1355092&r2=1355093&view=diff
==============================================================================
--- incubator/airavata/trunk/tools/setup_tomcat.sh (original)
+++ incubator/airavata/trunk/tools/setup_tomcat.sh Thu Jun 28 18:11:24 2012
@@ -347,6 +347,12 @@ for key in "${!props[@]}"; do
#do the copying
from=`echo $value | awk -F'=>' '{ print $1 }'`
to=`echo $value | awk -F'=>' '{ print $2 }'`
+ `echo "$to" | grep -qE "/$"`
+ if [ $? -eq 0 ];
+ then
+ # Ends with /, create the directory just incase if its not created
+ mkdir -p $to
+ fi
if [[ $from == http* ]];
then
temp_dir=`create_temp_dir`
|