Created
January 10, 2012 17:10
-
-
Save Naouak/1590052 to your computer and use it in GitHub Desktop.
Joomla Auto Packager
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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