Skip to content

Commit

Permalink
Add dotnet install script (#11)
Browse files Browse the repository at this point in the history
* Add dotnet install script

* Add dotnet in run_order.json

* Echo distribution version

* Added -f in ln
  • Loading branch information
mahdihasnat committed Nov 7, 2024
1 parent d9de618 commit be80d37
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ set -eux
export DEBIAN_FRONTEND=noninteractive
export DEBCONF_NONINTERACTIVE_SEEN=true

echo "Distribution information:\n $(lsb_release -a)"

shdir="scripts"

run_order="$shdir/run_order.txt"
Expand Down
16 changes: 16 additions & 0 deletions scripts/dotnet.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
set -eux

wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh

# https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script
bash dotnet-install.sh --channel 6.0 --version latest --install-dir '/usr/lib/dotnet/'
bash dotnet-install.sh --channel 7.0 --version latest --install-dir '/usr/lib/dotnet/'
bash dotnet-install.sh --channel 8.0 --version latest --install-dir '/usr/lib/dotnet/'

# create a symbolic link
# CAUTION: gh-workflows container already had /usr/lib/dotnet.
# So here -f force override the target file
ln -s -f /usr/lib/dotnet/dotnet /usr/bin/dotnet

dotnet --info
1 change: 1 addition & 0 deletions scripts/run_order.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ fdm.sh

# --- Dev tools ---
insomnia.sh
dotnet.sh

# -- SQL client ---
azuredatastudio.sh
Expand Down

0 comments on commit be80d37

Please sign in to comment.