-
-
Notifications
You must be signed in to change notification settings - Fork 132
Expand file tree
/
Copy pathphp-drush
More file actions
executable file
路20 lines (16 loc) 路 674 Bytes
/
Copy pathphp-drush
File metadata and controls
executable file
路20 lines (16 loc) 路 674 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
set -e -x
# Installation from Composer
# mkdir /opt/drush
# cd /opt/drush/
# # https://github.com/drush-ops/drush/releases
# composer require "drush/drush:8.*"
# ln -s /opt/drush/vendor/bin/drush /usr/local/bin/drush
# Latest v8.x PHAR
wget -qO- "https://api.github.com/repos/drush-ops/drush/releases" \
| jq -r 'first(.[] | select(.name|test("^8\\."))).assets | first(.[] | select (.name == "drush.phar")).browser_download_url' \
| wget -O /usr/local/bin/drush -i -
chmod +x /usr/local/bin/drush
# For Drupal 6
printf '#!/bin/bash\nDRUSH_PHP=/usr/bin/php5.6 exec /usr/local/bin/drush "$@"' >/usr/local/bin/drush5.6
chmod +x /usr/local/bin/drush5.6