1
0
mirror of https://github.com/balkian/dotfiles.git synced 2024-11-05 13:11:43 +00:00
dotfiles/make.sh
J. Fernando Sánchez 37837558b1 Use stow in make.sh
2017-03-24 16:52:14 +01:00

25 lines
654 B
Bash

#!/bin/bash
############################
# .make.sh
# This script creates symlinks from the home directory to any desired dotfiles in ~/dotfiles
############################
########## Variables
# change to the dotfiles directory
cd `dirname $0`
########## Don't forget the submodules
git submodule init
git submodule update --recursive
olddir=~/dotfiles$(date +%Y-%m-%d_%H:%M:%S) # old dotfiles backup directory
files=$(ls -1 --ignore="not_dots" --ignore="README.md" --ignore="make.sh" --ignore="Docker" $PWD) # list of files/folders to symlink in homedir
##########
# create dotfiles_old in homedir
for file in $files; do
stow -v $file
done