Skip to content

Commit

Permalink
Change init dotfiles to use stow
Browse files Browse the repository at this point in the history
  • Loading branch information
DevonMorris committed Jan 21, 2023
1 parent 7ba9c14 commit 5ee77c1
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions scripts/init_dotfiles.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
#!/usr/bin/env bash
# It should be as easy as running this setup file
# You'll probably need to change the remote to be able to push properly
git clone --bare https://gitlab.com/DevonMorris/dotfiles.git $HOME/.dots
function dots {
/usr/bin/env git --git-dir=$HOME/.dots/ --work-tree=$HOME $@
}
dots reset --hard HEAD
dots config status.showUntrackedFiles no
# Requires git and stow to work properly

ln -sf "$PWD/scripts" "$HOME/.local/bin/scripts"
if ! command -v git &> /dev/null
then
echo "Please install git"
exit
fi

if ! command -v stow &> /dev/null
then
echo "Please install stow"
exit
fi

git clone https://gitlab.com/DevonMorris/dotfiles.git $HOME/.dots
cd $HOME/.dots && stow -vvv -t $HOME --adopt .

0 comments on commit 5ee77c1

Please sign in to comment.