Complete structual change

This commit is contained in:
tosu 2023-02-14 01:57:30 +01:00
parent b7ea770d85
commit f3d71acd6a
1 changed files with 4 additions and 20 deletions

View File

@ -1,22 +1,6 @@
# Run with
# curl https://git.timo.one/tosu/pastebin/raw/branch/main/clone_dotfiles.sh | sh
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 '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
git clone --separate-git-dir=$HOME/.dotfiles gt:tosu/dotfiles $HOME/dotfiles-tmp
cp -r ~/dotfiles-tmp/.* ~
cp -r ~/dotfiles-tmp/* ~
rm -r ~/dotfiles-tmp/