add support for dotfiles repos (#25)
* initial tests for dotfiles * fix order * first attempt at dotfiles magic * trigger rebuild * fix symlink? * fix symlink again * another weird fix * another test * fix symlink this time? * fix
This commit is contained in:
@@ -76,6 +76,26 @@ else
|
||||
|
||||
fi
|
||||
|
||||
# Extract the user's dotfiles, if they exist
|
||||
if [[ -z "${DOTFILES_REPO}" ]]; then
|
||||
echo "[$PREFIX] DOTFILES_REPO is not specified"
|
||||
else
|
||||
echo "[$PREFIX] DOTFILES_REPO is specified"
|
||||
git clone $DOTFILES_REPO /home/coder/dotfiles
|
||||
|
||||
# Symlink if install.sh doesn't exist.
|
||||
# If it exits, run it
|
||||
if [ -f "/home/coder/dotfiles/install.sh" ]; then
|
||||
echo "[$PREFIX] install.sh exists, running it..."
|
||||
/bin/sh /home/coder/dotfiles/install.sh
|
||||
else
|
||||
echo "[$PREFIX] install.sh does not exist, symlinking dotfiles..."
|
||||
ln -sv /home/coder/dotfiles/* ~/
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
|
||||
echo "[$PREFIX] Starting code-server..."
|
||||
# Now we can run code-server with the default entrypoint
|
||||
/usr/bin/entrypoint.sh --bind-addr 0.0.0.0:8080 $START_DIR
|
||||
Reference in New Issue
Block a user