tainacan-theme/install.sh

52 lines
2.2 KiB
Bash
Raw Normal View History

#!/bin/bash
php -r '
echo "\n ..::Tainacan Theme::..\n";
echo "\nInitiating the installation with composer ... please wait!!\n";
echo "\nInitiating the copying of files...\n\n";
echo "\nCopy Frameword CSS - Bootstrap ...\n\n";
if (!file_exists("src/assets/vendor/bootstrap")) {
mkdir("src/assets/vendor/", 0777, true);
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-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");
2018-10-01 18:05:11 +00:00
recurse_copy("vendor/twbs/bootstrap/js/src", "src/assets/vendor/bootstrap/js/src");
copy("vendor/twbs/bootstrap/site/docs/4.1/assets/js/vendor/popper.min.js", "src/assets/vendor/bootstrap/js/popper.min.js");
2018-01-26 16:48:42 +00:00
echo "Copy Slick for Slider...\n\n";
if (!file_exists("src/assets/vendor/slick")) {
mkdir("src/assets/vendor/slick/", 0777, true);
mkdir("src/assets/vendor/slick/scss", 0777, true);
mkdir("src/assets/vendor/slick/js", 0777, true);
2018-06-29 18:50:23 +00:00
mkdir("src/assets/vendor/slick/fonts", 0777, true);
}
copy("vendor/fabianobn/slick/slick/slick-theme.scss", "src/assets/vendor/slick/scss/slick-theme.scss");
copy("vendor/fabianobn/slick/slick/slick.scss", "src/assets/vendor/slick/scss/slick.scss");
copy("vendor/fabianobn/slick/slick/slick.min.js", "src/assets/vendor/slick/js/slick.min.js");
copy("vendor/fabianobn/slick/slick/ajax-loader.gif", "src/assets/vendor/slick/ajax-loader.gif");
recurse_copy("vendor/fabianobn/slick/slick/fonts", "src/assets/vendor/slick/fonts");
2018-08-10 20:11:32 +00:00
echo "Finish Copy files! \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);
}
'