Skip to content

Commit dad06ea

Browse files
committed
dont install if container is already installed; also new version update for container
1 parent edfd9d1 commit dad06ea

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

install.sh

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,21 @@ else
1919
echo "✅ macOS system detected."
2020
fi
2121

22-
# Download and install the Apple 'container' tool
23-
echo "Downloading Apple 'container' tool..."
24-
curl -Lo container-installer.pkg https://github.com/apple/container/releases/download/0.1.0/container-0.1.0-installer-signed.pkg
22+
# Check if container is installed and display its version
23+
if command -v container &> /dev/null
24+
then
25+
echo "Apple 'container' tool detected. Current version:"
26+
container --version
27+
else
28+
echo "Apple 'container' tool not detected. Proceeding with installation..."
29+
30+
# Download and install the Apple 'container' tool
31+
echo "Downloading Apple 'container' tool..."
32+
curl -Lo container-installer.pkg https://github.com/apple/container/releases/download/0.2.0/container-0.2.0-installer-signed.pkg
2533

26-
echo "Installing Apple 'container' tool..."
27-
sudo installer -pkg container-installer.pkg -target /
34+
echo "Installing Apple 'container' tool..."
35+
sudo installer -pkg container-installer.pkg -target /
36+
fi
2837

2938
echo "Setting up local network domain..."
3039

0 commit comments

Comments
 (0)