20 lines
699 B
Bash
20 lines
699 B
Bash
cd
|
|
shopt -s dotglob
|
|
rm -rf .git
|
|
printf "\033[32m%s\033[m\n" "Backing up current dotfiles"
|
|
printf "\033[35m%s\033[m\n" ".bashrc -> .bashrc.OLDDOTFILE"
|
|
cp .bashrc .bashrc.OLDDOTFILE
|
|
printf "\033[35m%s\033[m\n" ".profile -> .profile.OLDDOTFILE"
|
|
cp .profile .profile.OLDDOTFILE
|
|
printf "\033[35m%s\033[m\n" ".inputrc -> .inputrc.OLDDOTFILE"
|
|
cp .inputrc .inputrc.OLDDOTFILE
|
|
printf "\033[32m%s\033[m\n" "Remove old dotfiles with 'shopt -s dotglob; rm -rf *.OLDDOTFILE'"
|
|
|
|
sleep 2
|
|
|
|
git init
|
|
git remote add origin https://git.timo.one/tosu/dotfilestosu
|
|
git fetch
|
|
git branch main origin/main
|
|
git checkout main 2>&1 | grep -v error | grep -v Please | grep -v Aborting | xargs -I {} rm -rf "{}"
|
|
git checkout main |