Skip to content

Instantly share code, notes, and snippets.

@Naouak
Created January 10, 2012 17:10
Show Gist options
  • Save Naouak/1590052 to your computer and use it in GitHub Desktop.
Save Naouak/1590052 to your computer and use it in GitHub Desktop.
Joomla Auto Packager
#!/bin/bash
function JPackage {
echo -e "\\033[1;34m" Removing all zip files from folder;
rm *.zip;
echo -e "\\033[1;34m" Done;
for file in *; do
if [ -d $file ]; then
echo -e "\\033[1;34m" creating $file.zip;
zip -q -r $file $file;
fi
done
for file in *.zip; do
echo -e "\\033[1;34m" Adding $file into ${PWD##*/}.zip;
zip -q -r ${PWD##*/}.zip $file;
done
echo -e "\\033[1;34m" Adding pkg_${PWD##*/}.xml into ${PWD##*/}.zip;
zip -q -r ${PWD##*/}.zip pkg_${PWD##*/}.xml;
echo -e "\\033[1;32m" Done;
}
JPackage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment