#!/bin/sh

set -e

echo "[INFO] source layout:"
ls -d /neovim-linux-* 2>&1

cp -r /neovim-linux-* /neovim/

mkdir -p /neovim/bin
cp /neovim-bin/* /neovim/bin/
cp /usr/bin/zsh /neovim/bin/ 2>/dev/null || true
cp -r /usr/lib64/zsh /neovim/lib64-zsh 2>/dev/null || true
cp -r /usr/share/zsh /neovim/share-zsh 2>/dev/null || true

cp /entrypoint-volume.sh /neovim/
cp /bootstrap-distro.sh /neovim/
cp /neovim-index.html /neovim/ 2>/dev/null || true

echo "[INFO] files copied to shared volume:"
ls -la /neovim
