Skip to content

Instantly share code, notes, and snippets.

@mustakimali
Last active September 1, 2021 18:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mustakimali/1dd2a1f4ea22907760eb112a7cdd9c68 to your computer and use it in GitHub Desktop.
Save mustakimali/1dd2a1f4ea22907760eb112a7cdd9c68 to your computer and use it in GitHub Desktop.
bash file to update .net core daily build, to be used using `dn-pre`. ASSUMES: you already have ~/bin folder and included in the PATH
#!/bin/bash
set -eu
rm -rf ~/bin/dotnet-daily || true
mkdir ~/bin/dotnet-daily || true
wget -P ~/bin/dotnet-daily/ https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.sh
chmod +x ~/bin/dotnet-daily/dotnet-install.sh
~/bin/dotnet-daily/dotnet-install.sh -c main -v latest --install-dir ~/bin/dotnet-daily
#wget -P ~/bin/dotnet-daily/ https://aka.ms/dotnet/net6/dev/Sdk/dotnet-sdk-linux-x64.tar.gz
#tar -xzvf ~/bin/dotnet-daily/dotnet-sdk-linux-x64.tar.gz -C ~/bin/dotnet-daily
#echo "Checksum -> " $(sha1sum ~/bin/dotnet-daily/dotnet-sdk-linux-x64.tar.gz)
#rm ~/bin/dotnet-daily/dotnet-sdk-linux-x64.tar.gz
rm ~/bin/dotnet-daily/dotnet-install.sh
rm ~/bin/dn-pre || true
ln -s ~/bin/dotnet-daily/dotnet ~/bin/dn-pre
# bunch of symlinks
sudo rm /usr/share/dotnet/dotnet-pre || true
sudo ln -s ~/bin/dotnet-daily/dotnet /usr/share/dotnet/dotnet-pre
sudo rm /usr/bin/dotnet-pre || true
sudo ln -s ~/bin/dotnet-daily/dotnet /usr/bin/dotnet-pre
echo "Done, use dotnet-pre or dn-pre to use the latest .NET Core SDK Daily Build"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment