]>
zdv2.bktei.com Git - BK-2020-03.git/blob - unitproc/bkt-bkunzip
   4     # Desc: Uncompresses zip file. 
   9         if [[ -f "$fin" && "$fin" =~ \.
zip$ 
]]; then 
  10             # Remove the file extension to create a directory name 
  12             # Create the directory if it doesn't exist 
  14                 { echo "ERROR:Could not mkdir:$dir"; return 1; }; 
  15             # Extract the zip file into the directory 
  16             unzip "$fin" -x / -d "$dir"  || \
 
  17                 { echo "ERROR:Could not unzip:$fin"; return 1; }; 
  19             echo "ERROR:Not a valid zip file:$fin" 1>&2; return 1; 
  22 }; # wrapper for unzip 
  24 printf "WARNING:$0:This is a bash function definition."