File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 7171 # Update package list
7272 sudo apt-get update
7373
74+ # Check if Microsoft repository is already added, if not add it
75+ if ! grep -q "packages.microsoft.com" /etc/apt/sources.list /etc/apt/sources.list.d/* 2>/dev/null; then
76+ echo "Adding Microsoft repository..."
77+ # Add Microsoft's GPG key and repository
78+ wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
79+ sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-$(lsb_release -cs)-prod $(lsb_release -cs) main"
80+
81+ # Update package list again after adding the new repo
82+ sudo apt-get update
83+ else
84+ echo "Microsoft repository already configured, skipping..."
85+ fi
86+
7487 # Install OMI (Open Management Infrastructure) which provides libmi
7588 sudo apt-get install -y omi
7689
You can’t perform that action at this time.
0 commit comments