Closed frederickjh closed 4 years ago
uses wget AND curl? odd.
i'm ambivalent about adding this.
Explanation:
curl -s -L
is to silently download the latest release HTML (after following redirect)
egrep -o
'...' uses regex to find the file you want
wget --base=http://github.com/ -i -
converts the relative path from the pipeline to absolute URL
and -O
scollector sets the desired file name.
@weitzman Can you craft the command using only one of them so that it downloads the latest release?
No I cannot ... ping @webflo to see if he has an opinion on this proposal.
@weitzman @frederickjh
following this https://help.github.com/en/github/administering-a-repository/linking-to-releases
just using
wget -O drush.phar https://github.com/drush-ops/drush-launcher/releases/latest/download/drush.phar
works fine
can't we simplify the installation by:
wget -O /usr/local/bin/drush https://github.com/drush-ops/drush-launcher/releases/latest/download/drush.phar
and chmod +x /usr/local/bin/drush
I updated to use the evergreen url for download. lets use a new use for any PATH changes.
Please consider changing the installation command so that it will always install the latest version after a new release.
The following command will parse out the link to the latest version and download it. This can be useful when this is scripted for deployments, so it does not need to be changed for each new release.
curl -s -L https://github.com/drush-ops/drush-launcher/releases/latest | egrep -o '/drush-ops/drush-launcher/releases/download/[0-9.]*/drush.phar' | wget --base=http://github.com/ -i - -O drush.phar
More info on this command string