62 lines
1.7 KiB
Bash
Executable File
62 lines
1.7 KiB
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
|
|
echo "[+] Setting up Zero-OS component submodules..."
|
|
|
|
# Check if we're in git repository
|
|
if [ ! -d ".git" ]; then
|
|
echo "Error: Not in a git repository. Please run 'git init' first."
|
|
exit 1
|
|
fi
|
|
|
|
# Create components directory
|
|
mkdir -p components
|
|
|
|
# Add Zero-OS components as git submodules
|
|
echo " Adding zinit (init system)..."
|
|
if [ ! -d "components/zinit" ]; then
|
|
git submodule add https://github.com/threefoldtech/zinit.git components/zinit
|
|
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
|
|
else
|
|
echo " seektime 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)..."
|
|
if [ ! -d "components/mycelium" ]; then
|
|
git submodule add https://github.com/threefoldtech/mycelium.git components/mycelium
|
|
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
|
|
else
|
|
echo " rfs submodule already exists"
|
|
fi
|
|
|
|
# Initialize and update submodules
|
|
echo " Initializing submodules..."
|
|
git submodule init
|
|
git submodule update
|
|
|
|
echo "[+] Zero-OS component submodules setup complete"
|
|
echo ""
|
|
echo "Submodules added:"
|
|
ls -la components/
|
|
echo ""
|
|
echo "To update submodules later, run:"
|
|
echo " git submodule update --remote" |