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:38
Total downloads:2,441
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)


Post A Reply Comment Options
Unread 06/04/19, 02:42 PM  
Shadowfen
AddOn Author - Click to view AddOns

Forum posts: 83
File comments: 750
Uploads: 15
Perhaps it breaks Minion because the zip files it produces are
Code:
myaddon_x.x.zip
instead of
Code:
myaddon-x.x.zip
?
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: