Quantcast
Download
(373 b)
Download
Updated: 03/09/18 02:11 AM
Pictures
File Info
Compatibility:
Dragon Bones (3.3)
Updated:03/09/18 02:11 AM
Created:03/09/18 02:11 AM
Monthly downloads:7
Total downloads:181
Favorites:0
MD5:
Categories:Developer Utilities, Discontinued & Outdated
Bash: Zip addon directory
Version: 1.0
by: manavortex [More]
Script breaks Minion
For some reason, zip files created with this script won't be correctly processed by Minion. I'll leave this here so folks can investigate.

A bash script to compress a (not hidden) folder to <AddonName>_<version>.zip

Loop version
Code:
#!/usr/bin/env bash

for directory in `find . -type d -maxdepth 1 -mindepth 1 -and \( -not -name ".*" \)`; do
  while read line; do
    if [[ $line = *"## Version:"* ]]; then
      version=${line#*: }
    fi
  done < $directory/$directory.txt
  zipName=$directory
  zipName+=_$version.zip
  zip -r $zipName $directory	
done

single folder
Code:
#!/usr/bin/env bash

directory=yourAddon

while read line; do
  if [[ $line = *"## Version:"* ]]; then
    version=${line#*: }
  fi
  done < $directory/$directory.txt
  zipName=$directory
  zipName+=_$version.zip
  zip -r $zipName $directory
Optional Files (0)


There have been no comments posted to this file.
Be the first to add one.



Category Jump: