-
Notifications
You must be signed in to change notification settings - Fork 66
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
Scripts: add InstallFromSource.sh #427
Conversation
d927580
to
0eb084b
Compare
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>
0eb084b
to
a2db901
Compare
Scripts/Linux/InstallFromSource.sh
Outdated
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 |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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!"
There was a problem hiding this comment.
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>
9de2382
to
087de90
Compare
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
This script should include enough content to install Scalar and all of
its dependencies on Linux, including Watchman.