Skip to content

Commit ad1cc03

Browse files
author
Gemini CLI
committed
Update install.sh to support root repository execution without redundant rsync
1 parent d4b2130 commit ad1cc03

1 file changed

Lines changed: 16 additions & 13 deletions

File tree

install.sh

100644100755
Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,24 @@ fi
2727
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
2828
echo "[INFO] MiOS system installer running from ${REPO_ROOT}"
2929

30-
# Apply FHS overlay. We rsync each top-level overlay dir if it exists.
31-
for d in usr etc var srv; do
32-
if [[ -d "${REPO_ROOT}/${d}" ]]; then
33-
echo "[INFO] Applying overlay: ${d}/"
34-
rsync -aH --info=stats1 "${REPO_ROOT}/${d}/" "/${d}/"
30+
if [[ "${REPO_ROOT}" != "/" ]]; then
31+
# Apply FHS overlay. We rsync each top-level overlay dir if it exists.
32+
for d in usr etc var srv; do
33+
if [[ -d "${REPO_ROOT}/${d}" ]]; then
34+
echo "[INFO] Applying overlay: ${d}/"
35+
rsync -aH --info=stats1 "${REPO_ROOT}/${d}/" "/${d}/"
36+
fi
37+
done
38+
39+
# v1/ holds discovery symlinks; we materialize them at /v1.
40+
if [[ -d "${REPO_ROOT}/v1" ]]; then
41+
echo "[INFO] Materializing /v1 discovery surface"
42+
install -d /v1
43+
rsync -aH "${REPO_ROOT}/v1/" "/v1/"
3544
fi
36-
done
37-
38-
# v1/ holds discovery symlinks; we materialize them at /v1.
39-
if [[ -d "${REPO_ROOT}/v1" ]]; then
40-
echo "[INFO] Materializing /v1 discovery surface"
41-
install -d /v1
42-
rsync -aH "${REPO_ROOT}/v1/" "/v1/"
45+
else
46+
echo "[INFO] Running directly from root (/), skipping overlay sync."
4347
fi
44-
4548
echo "[INFO] Running systemd-sysusers"
4649
systemd-sysusers
4750

0 commit comments

Comments
 (0)