mikewalch commented on a change in pull request #964: Fixes #957 Fluo scripts 
copy jars into fluo software dir.
URL: https://github.com/apache/fluo/pull/964#discussion_r148005359
 
 

 ##########
 File path: modules/distribution/src/main/scripts/fluo
 ##########
 @@ -143,7 +143,10 @@ function setup_service {
     app=${BASH_REMATCH[1]}
     verify_app "$app"
     check_conn_props
-    app_lib=$lib/apps/$1
+    # create a temp dir to fetch application jars to
+    app_lib=$(mktemp -d "$FLUO_TMP"/fluo-"$app"-XXXXXXXXX) || die "fatal: 
unable to allocate a temporary directory"
+    # schedule removal of app_lib tmp dir when this script exits
+    trap "rm -rf '""$app_lib""'" EXIT HUP INT QUIT TERM
     mkdir -p "$app_lib"
 
 Review comment:
   Is `mkdir` command necessary now that the directory is created by `mktemp`?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to