8000 Scripts: add InstallFromSource.sh by derrickstolee · Pull Request #427 · microsoft/scalar · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Scripts: add InstallFromSource.sh #427

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 25, 2020

Conversation

derrickstolee
Copy link
Contributor

This script should include enough content to install Scalar and all of
its dependencies on Linux, including Watchman.

@derrickstolee derrickstolee force-pushed the install-from-source branch 3 times, most recently from d927580 to 0eb084b Compare September 15, 2020 12:41
This script should include enough content to install Scalar and all of
its dependencies on Linux, excluding Watchman.

Git and GCM Core are installed from .deb packages while Scalar must be
compiled.

Helped-by: Jeff King <peff@peff.net>
Helped-by: Chris Darroch <chrisd8088@github.com>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
@derrickstolee derrickstolee marked this pull request as ready for review September 23, 2020 13:25
sudo apt-get install -y apt-transport-https && sudo apt-get update -qq

sudo apt-get install -y wget
wget https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On my debian system, lsb_release -rs returns "unstable", so this wget gets a 404. You might also need to make sure lsb-release is installed (it's priority "optional" in debian).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will make sure any errors in this section report a message saying "Go to figure out dotnet for yourself!"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good points -- maybe something like:

sudo apt-get install -y lsb-release wget
LSB_VERSION=$(lsb_release -rs | awk '/^[0-9]+\.[0-9]+$/ { print }')
if [ -z "$LSB_VERSION" ]; then LSB_VERSION="20.04"; fi
wget https://packages.microsoft.com/config/ubuntu/"$LSB_VERSION"/packages-microsoft-prod.deb -O packages-microsoft-prod.deb

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
wget https://packages.microsoft.com/config/ubuntu/"$LSB_VERSION"/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb

if sudo apt-get install -y dotnet-sdk-3.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the Azure Pipelines agent, we use the install scripts to get .NET on the box. They've done some heavy medium lifting across various Linux flavors to get prereqs sorted and whatnot. This script looks pretty Ubuntu/Debian flavored so perhaps you 🤷‍♂️ but I thought I'd mention it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting! If we have any more problems with installing dotnet I will definitely replace these with something like wget https://dotnet.microsoft.com/download/dotnet-core/scripts/v1/dotnet-install.sh && ./dotnet-install.sh

Copy link
Contributor
@chrisd8088 chrisd8088 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0