diff --git a/scripts/update/update.php b/scripts/update/update.php index 3b3db90..8fbd00e 100644 --- a/scripts/update/update.php +++ b/scripts/update/update.php @@ -107,10 +107,6 @@ function get_file($url, $newfilename) { mkdir(getcwd().'/scripts/update', 0777, true); } - if (!file_exists(getcwd().'/drush')) { - mkdir(getcwd().'/drush', 0777, true); - } - if (!file_exists(getcwd().'/bin')) { mkdir(getcwd().'/bin', 0777, true); } @@ -134,15 +130,6 @@ function get_file($url, $newfilename) { get_file($base_path . "scripts/update/version-check.php", getcwd().'/scripts/update/version-check.php'); get_file($base_path . "scripts/update/update-config.json", getcwd().'/scripts/update/update-config.json'); - // Only download them if they don't exist. - if (!file_exists(getcwd().'/drush/policy.drush.inc')) { - get_file($base_path . "drush/policy.drush.inc", getcwd().'/drush/policy.drush.inc'); - } - - if (!file_exists(getcwd().'/drush/README.md')) { - get_file($base_path . "drush/README.md", getcwd().'/drush/README.md'); - } - chmod(getcwd().'/scripts/update/update-varbase.sh', 0755); chmod(getcwd().'/scripts/update/version-check.php', 0755); chmod(getcwd().'/scripts/composer/VarbaseUpdate.php', 0755); diff --git a/scripts/update/varbase-updater.sh b/scripts/update/varbase-updater.sh index b575b70..a96f0b6 100644 --- a/scripts/update/varbase-updater.sh +++ b/scripts/update/varbase-updater.sh @@ -12,7 +12,14 @@ DRUPALPATH='docroot'; if [ -d "${BASEDIR}/web" ]; then DRUPALPATH='web'; fi + +# Use the local Drush if it was insalled in the project. +# If not in the local, use the global Drush in the system. DRUSH="drush"; +if [ -d "${BASEDIR}/vendor/drush/drush" ]; then + DRUSH="${BASEDIR}/vendor/drush/drush/drush"; +fi + clear; echo "$(tput setaf 4)"; cat << "EOF"