Skip to content

Latest commit

 

History

History
21 lines (17 loc) · 377 Bytes

SETUP_SCRIPT.md

File metadata and controls

21 lines (17 loc) · 377 Bytes

Setup script

#!/bin/sh

if ! command -v chezmoi > /dev/null; then
  curl -sfL https://git.io/chezmoi | sh
  PATH=./bin:$PATH
fi

if [ -d ~/.local/share/chezmoi/.git ]; then
  chezmoi update --apply
else
  chezmoi init --apply https://github.com/cherreco/dotfiles.git || chezmoi purge --force
fi

if [ -f ./bin/chezmoi ]; then
  rm ./bin/chezmoi
  rmdir ./bin
fi