Skip to content

Instantly share code, notes, and snippets.

@silv3rm00n
Created April 9, 2012 06:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save silv3rm00n/2342028 to your computer and use it in GitHub Desktop.
Save silv3rm00n/2342028 to your computer and use it in GitHub Desktop.
#!/bin/bash
#clear the terminal
clear
echo "Starting Framework Processing..."
#First remove the framework.zip if any
$(rm -f /var/www/framework.zip)
echo "Removed /var/www/framework.zip"
#Now remove the framework-encoded directory if any
$(rm -rf /var/www/framework-encoded/)
echo "Removed /var/www/framework-encoded/"
#Export the last commit from the git repo
$(git --git-dir=/var/www/framework/.git checkout-index -a --prefix=/var/www/framework-encoded/)
echo "Exported /var/www/framework to /var/www/framework-encoded/"
#Encode the specific files
$(/opt/ioncube_encoder5_7.0/ioncube_encoder5_6.5 /var/www/framework/lib/form/ -o /var/www/framework-encoded/lib/form --replace-target --expire-in 7d)
echo "Encoded specific files"
#Create a zip file
$(zip -r /var/www/framework.zip /var/www/framework-encoded/)
echo "Created zip file"
echo "Processing complete."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment