2018-01-24 19:09:23 +00:00
|
|
|
#!/bin/bash
|
|
|
|
php -r '
|
|
|
|
echo "\n ..::Tainacan Theme::..\n";
|
|
|
|
|
|
|
|
echo "\nStarting installation with composer ... please wait!!";
|
|
|
|
|
2018-03-29 17:59:55 +00:00
|
|
|
echo "\nChecking if bootstrap folders exist ...\n\n";
|
2018-01-24 19:09:23 +00:00
|
|
|
|
2018-03-29 17:59:55 +00:00
|
|
|
if (!file_exists("src/assets/bootstrap")) {
|
2018-01-26 16:48:42 +00:00
|
|
|
mkdir("src/assets/vendor/bootstrap/", 0777, true);
|
|
|
|
mkdir("src/assets/vendor/bootstrap/scss", 0777, true);
|
|
|
|
mkdir("src/assets/vendor/bootstrap/js", 0777, true);
|
2018-01-24 19:09:23 +00:00
|
|
|
}
|
|
|
|
|
2018-03-29 17:59:55 +00:00
|
|
|
echo "\m Checking if file bootstrap navwalker exist ... \n\n";
|
|
|
|
|
|
|
|
if (!file_exists("src/vendor/class-wp-bootstrap-navwalker.php")) {
|
|
|
|
echo "\m Copy Boostrap Navwalker ... \n\n";
|
2018-04-04 17:53:47 +00:00
|
|
|
mkdir("src/vendor/", 0777, true);
|
2018-03-29 17:59:55 +00:00
|
|
|
copy("vendor/wp-bootstrap/wp-bootstrap-navwalker/class-wp-bootstrap-navwalker.php", "src/vendor/class-wp-bootstrap-navwalker.php");
|
|
|
|
}
|
2018-01-24 19:09:23 +00:00
|
|
|
|
|
|
|
echo "\nStarting Copying Files...\n";
|
|
|
|
|
|
|
|
echo "...Bootstrap\n";
|
2018-01-26 16:48:42 +00:00
|
|
|
recurse_copy("vendor/twbs/bootstrap/scss", "src/assets/vendor/bootstrap/scss");
|
|
|
|
copy("vendor/twbs/bootstrap/dist/js/bootstrap.min.js", "src/assets/vendor/bootstrap/js/bootstrap.min.js");
|
|
|
|
copy("vendor/twbs/bootstrap/assets/js/vendor/popper.min.js", "src/assets/vendor/bootstrap/js/popper.min.js");
|
|
|
|
|
2018-01-24 19:09:23 +00:00
|
|
|
|
|
|
|
echo "Finish!\n\n";
|
|
|
|
|
|
|
|
function recurse_copy($src,$dst) {
|
|
|
|
$dir = opendir($src);
|
|
|
|
@mkdir($dst);
|
|
|
|
while(false !== ( $file = readdir($dir)) ) {
|
|
|
|
if (( $file != "." ) && ( $file != ".." )) {
|
|
|
|
if ( is_dir($src . "/" . $file) ) {
|
|
|
|
recurse_copy($src . "/" . $file,$dst . "/" . $file);
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
copy($src . "/" . $file,$dst . "/" . $file);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
closedir($dir);
|
|
|
|
}
|
|
|
|
'
|