Clean up submodule references

This commit is contained in:
2025-08-15 22:38:36 +02:00
parent ee842f3783
commit a489a052bb
2 changed files with 45 additions and 37 deletions

View File

@@ -1,7 +1,7 @@
#!/bin/sh
set -e
echo "[+] Setting up Zero-OS component submodules..."
echo "[+] Setting up Zero-OS components..."
# Check if we're in git repository
if [ ! -d ".git" ]; then
@@ -12,40 +12,48 @@ fi
# Create components directory
mkdir -p components
# Add Zero-OS components as git submodules
echo " Adding zinit (init system)..."
# 1. Zinit - master branch
echo " Adding zinit (init system) from master branch..."
if [ ! -d "components/zinit" ]; then
git submodule add https://github.com/threefoldtech/zinit.git components/zinit
cd components/zinit
git checkout master
cd ../..
else
echo " zinit submodule already exists"
fi
echo " Adding seektime (disk detection)..."
if [ ! -d "components/seektime" ]; then
git submodule add https://github.com/threefoldtech/seektime.git components/seektime
# 2. RFS - tag v2.0.6 (musl build)
echo " Adding rfs (rust filesystem) tag v2.0.6..."
if [ ! -d "components/rfs" ]; then
git submodule add https://github.com/threefoldtech/rfs.git components/rfs
cd components/rfs
git checkout v2.0.6
cd ../..
else
echo " seektime submodule already exists"
echo " rfs submodule already exists"
fi
echo " Adding core-x (container control)..."
if [ ! -d "components/core-x" ]; then
git submodule add https://github.com/threefoldtech/core-x.git components/core-x
else
echo " core-x submodule already exists"
fi
echo " Adding mycelium (networking layer)..."
# 3. Mycelium - tag 0.6.1 (musl build)
echo " Adding mycelium (networking layer) tag 0.6.1..."
if [ ! -d "components/mycelium" ]; then
git submodule add https://github.com/threefoldtech/mycelium.git components/mycelium
cd components/mycelium
git checkout 0.6.1
cd ../..
else
echo " mycelium submodule already exists"
fi
echo " Adding rfs (rust filesystem)..."
if [ ! -d "components/rfs" ]; then
git submodule add https://github.com/threefoldtech/rfs.git components/rfs
# 4. CoreX - direct download (static binary)
echo " Downloading CoreX static binary v2.1.4..."
mkdir -p components/corex
if [ ! -f "components/corex/corex" ]; then
curl -L -o components/corex/corex https://github.com/threefoldtech/corex/releases/download/2.1.4/corex-2.1.4-amd64-linux-static
chmod +x components/corex/corex
echo " CoreX binary downloaded successfully"
else
echo " rfs submodule already exists"
echo " CoreX binary already exists"
fi
# Initialize and update submodules
@@ -53,10 +61,13 @@ echo " Initializing submodules..."
git submodule init
git submodule update
echo "[+] Zero-OS component submodules setup complete"
echo "[+] Zero-OS components setup complete"
echo ""
echo "Submodules added:"
ls -la components/
echo "Components added:"
echo " - zinit (master): $(ls -la components/zinit 2>/dev/null | wc -l) files"
echo " - rfs (v2.0.6): $(ls -la components/rfs 2>/dev/null | wc -l) files"
echo " - mycelium (0.6.1): $(ls -la components/mycelium 2>/dev/null | wc -l) files"
echo " - corex (v2.1.4): $(ls -la components/corex/corex 2>/dev/null && echo "downloaded" || echo "missing")"
echo ""
echo "To update submodules later, run:"
echo " git submodule update --remote"