Created
April 8, 2015 22:32
-
-
Save zomars/8d2387bd4e3f2463d141 to your computer and use it in GitHub Desktop.
Bolt.cm one click install
This file contains 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
<?php | |
// Script to install the latest version of Bolt.cm CMS | |
// Define function to test if curl is installed on the server | |
function _is_curl_installed() { | |
if (in_array ('curl', get_loaded_extensions())) { | |
return true; | |
} else { | |
return false; | |
} | |
} | |
// Ouput text to user based on test | |
if (_is_curl_installed()) { | |
shell_exec("curl -O http://bolt.cm/distribution/bolt-latest.tar.gz"); | |
shell_exec("tar -xzf bolt-latest.tar.gz --strip-components=1"); | |
shell_exec("chmod -R 777 files/ app/database/ app/cache/ app/config/ theme/ extensions/"); | |
echo "Bolt.cm was successfully installed"; | |
} else { | |
echo "cURL is NOT installed on this server"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Useful for shared hosts, or simply when you don't have shell access. Also avoid large FTP transfers by uploading only your theme and config files.