@@ -5,14 +5,14 @@ echo "🚀 Setting up SAP Documentation MCP Server..."
55
66# Install dependencies
77echo " 📦 Installing dependencies..."
8- npm install
8+ npm install --loglevel=warn
99
1010# Initialize and update git submodules
1111echo " 📚 Initializing documentation submodules..."
1212
1313# Initialize/update submodules (including new ones) to latest
1414echo " → Syncing submodule configuration..."
15- git submodule sync --recursive
15+ git submodule sync --recursive --quiet
1616
1717# Collect submodules from .gitmodules
1818echo " → Ensuring all top-level submodules are present (shallow, single branch)..."
@@ -30,9 +30,9 @@ while IFS= read -r line; do
3030
3131 if [ ! -d " $path /.git" ]; then
3232 echo " - cloning shallow..."
33- GIT_LFS_SKIP_SMUDGE=1 git clone --filter=blob:none --no-tags --single-branch --depth 1 --branch " $branch " " $url " " $path " || {
33+ GIT_LFS_SKIP_SMUDGE=1 git clone --filter=blob:none --no-tags --single-branch --depth 1 --branch " $branch " --quiet " $url " " $path " || {
3434 echo " ! clone failed for $path , retrying with master"
35- GIT_LFS_SKIP_SMUDGE=1 git clone --filter=blob:none --no-tags --single-branch --depth 1 --branch master " $url " " $path " || true
35+ GIT_LFS_SKIP_SMUDGE=1 git clone --filter=blob:none --no-tags --single-branch --depth 1 --branch master --quiet " $url " " $path " || true
3636 }
3737 else
3838 echo " - updating shallow to latest $branch ..."
@@ -44,16 +44,16 @@ while IFS= read -r line; do
4444 git -C " $path " config remote.origin.tagOpt --no-tags || true
4545 git -C " $path " config remote.origin.promisor true || true
4646 git -C " $path " config remote.origin.partialclonefilter blob:none || true
47- if ! GIT_LFS_SKIP_SMUDGE=1 git -C " $path " fetch --filter=blob:none --no-tags --depth 1 --prune origin " $branch " ; then
47+ if ! GIT_LFS_SKIP_SMUDGE=1 git -C " $path " fetch --filter=blob:none --no-tags --depth 1 --prune --quiet origin " $branch " ; then
4848 echo " ! fetch failed for $branch , trying master"
4949 git -C " $path " config remote.origin.fetch " +refs/heads/master:refs/remotes/origin/master"
5050 git -C " $path " remote set-branches origin master || true
51- GIT_LFS_SKIP_SMUDGE=1 git -C " $path " fetch --filter=blob:none --no-tags --depth 1 --prune origin master || true
51+ GIT_LFS_SKIP_SMUDGE=1 git -C " $path " fetch --filter=blob:none --no-tags --depth 1 --prune --quiet origin master || true
5252 branch=master
5353 fi
5454 # Checkout/reset to the fetched tip
55- git -C " $path " checkout -B " $branch " " origin/$branch " 2> /dev/null || git -C " $path " checkout " $branch " || true
56- git -C " $path " reset --hard " origin/$branch " 2> /dev/null || true
55+ git -C " $path " checkout -B " $branch " " origin/$branch " --quiet 2> /dev/null || git -C " $path " checkout " $branch " --quiet || true
56+ git -C " $path " reset --hard " origin/$branch " --quiet 2> /dev/null || true
5757 # Compact local repository storage (keeps only the shallow pack)
5858 git -C " $path " reflog expire --expire=now --all > /dev/null 2>&1 || true
5959 git -C " $path " gc --prune=now --aggressive > /dev/null 2>&1 || true
@@ -64,11 +64,10 @@ if [ -n "$SKIP_NESTED_SUBMODULES" ]; then
6464 echo " → Skipping nested submodule initialization (SKIP_NESTED_SUBMODULES=1)"
6565else
6666 echo " → Initializing nested submodules to pinned commits (shallow)..."
67- git submodule update --init --recursive --depth 1 || true
67+ git submodule update --init --recursive --depth 1 --quiet || true
6868fi
6969
70- echo " → Current submodule status:"
71- git submodule status --recursive || true
70+ echo " → Submodule setup complete"
7271
7372# Build the search index
7473echo " 🔍 Building search index..."
0 commit comments