sync dotfiles across machines
Note: dync is only compatible with unix based systems
ZSH
cd "$HOME/.config"
git clone git@github.com:anton-oz/dync.git
cd dync
echo "export DYNC=$(realpath ./)" >> ~/.zshrc
sed -i '$d' .gitignore
sudo ln -s $(realpath $DYNC/src/dync.sh) /usr/bin/dync- Move to
~/.config, or wherever you would like dync to live and clone this repo.
cd "$HOME/.config"
git clone git@github.com:anton-oz/dync.git
cd dync- IMPORANT: Make sure that you are in the dync directory before running this next command.
# zsh
echo "export DYNC=$(realpath ./)" >> ~/.zshrc
# bash
echo "export DYNC=$(realpath ./)" >> ~/.bashrc
# you will need to restart your shell so these changes take effect- remove
./dotfilesfrom.gitignore.
# remove the tail end of .gitignore to add your files to git
sed -i '$d' .gitignore- link dync to bin and dync is good to go!
# Linux, Mac OS
sudo ln -s $(realpath $DYNC/src/dync.sh) /usr/bin/dyncTo check if installed correctly, enter this command:
dyncYou should see the help menu, with basic commands and what they do.
Dync will only backup and restore files that exist inside of ./dotfiles. If you
restore to a previous backup, dync will not remove files that dont exist in that
backup. This is to prevent deletion of things that were not meant to be deleted in
the $HOME directory and keep the files that dync tracks and backs up to a minimum.