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