File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ die() {
2121
2222ok_or_die () {
2323	if  [ $?  -ne  0 ];  then 
24- 		die $1 
24+ 		die " $1 " 
2525	fi 
2626}
2727
@@ -37,18 +37,22 @@ remote_path=$5
3737
3838info " Will upload $local_path  to $remote_path " 
3939
40- mc alias  set  s3 $url   $access_key   $secret_key 
40+ mc alias  set  s3 " $url "   " $access_key "   " $secret_key " 
4141ok_or_die " Could not set mc alias" 
4242
43- mc cp -r $local_path  s3/$remote_path 
43+ IFS=$' \n ' 
44+ for  p  in  $( eval ls -d -1 " $local_path " ) ;  do 
45+ 	mc cp -r " $p " " $remote_path " ; 
46+ done 
47+ unset  IFS
4448ok_or_die " Could not upload object" 
4549
4650if  [[ $#  -eq  6 ]] ;  then 
4751	if  [[ $6  -eq  1 ]] ;  then 
4852		info " Will make $remote_path  public" 
49- 		mc anonymous -r set  download s3/$remote_path 
53+ 		mc anonymous -r set  download s3/" $remote_path " 
5054	else 
5155		info " Will make $remote_path  private" 
52- 		mc anonymous -r set  private s3/$remote_path  ||  true 
56+ 		mc anonymous -r set  private s3/" $remote_path " ||  true 
5357	fi 
5458fi 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments