mirror of
https://github.com/Cian-H/my_nvim.git
synced 2025-12-22 16:21:56 +00:00
Improved container entrypoint
This commit is contained in:
@@ -2,7 +2,21 @@
|
||||
|
||||
mkdir -p ~/.config/nvim
|
||||
|
||||
if [ -z "$(ls -A ~/.config/nvim)" ]; then
|
||||
WORKDIR=$(pwd)
|
||||
|
||||
cd /my_nvim_config
|
||||
git remote update
|
||||
if ! git rev-list --count HEAD..@{upstream} > /dev/null; then
|
||||
git pull
|
||||
STALE_CONFIG=true
|
||||
else
|
||||
STALE_CONFIG=false
|
||||
fi
|
||||
|
||||
if [ ! "$(ls -A ~/.config/nvim)" ] || $STALE_CONFIG; then
|
||||
cp -r /my_nvim_config/* ~/.config/nvim/
|
||||
fi
|
||||
|
||||
cd "$WORKDIR"
|
||||
|
||||
/usr/bin/env nvim
|
||||
|
||||
Reference in New Issue
Block a user