safer apply scripts

This commit is contained in:
Christoph J. Scherr 2023-07-04 21:33:01 +02:00
parent d702e43215
commit 8065b790fe
Signed by: PlexSheep
GPG Key ID: 25B4ACF7D88186CC
7 changed files with 55 additions and 46 deletions

View File

@ -1 +1,3 @@
#!/bin/bash
set -e
cp -r $(pwd)/home/.config ~

View File

@ -1,12 +1,13 @@
#!/bin/bash
set -e
rm -rf ~/.zsh-very-old
mv ~/.zsh-old ~/.zsh-very-old
mv ~/.zsh ~/.zsh-old
[ -f ~/.zsh-very.old ] && rm -rf ~/.zsh-very-old
[ -f ~/.zsh-old ] && mv ~/.zsh-old ~/.zsh-very-old
[ -f ~/.zsh ] && mv ~/.zsh ~/.zsh-old
rm -rf ~/.zshrc-very-old
mv ~/.zshrc-old ~/.zshrc-very-old
mv ~/.zshrc ~/.zshrc-old
[ -f ~/.zshrc-very-old ] && rm -rf ~/.zshrc-very-old
[ -f ~/.zshrc-old ] && mv ~/.zshrc-old ~/.zshrc-very-old
[ -f ~/.zshrc ] && mv ~/.zshrc ~/.zshrc-old
cp -r $(pwd)/home/.gitconfig ~
cp -r $(pwd)/home/.p10k.zsh ~
@ -16,12 +17,7 @@ cp -r $(pwd)/home/.vimrc ~
cp -r $(pwd)/home/.local ~
cp -r $(pwd)/home/.config ~
cp -r $(pwd)/home/.tmux.conf ~
touch ~/.local.zsh
ln ~/.zsh/zshrc ~/.zshrc
# Install Vim Stuff
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'

View File

@ -1,12 +1,12 @@
#!/bin/bash
rm -rf ~/.zsh-very-old
mv ~/.zsh-old ~/.zsh-very-old
mv ~/.zsh ~/.zsh-old
[ -f ~/.zsh-very.old ] && rm -rf ~/.zsh-very-old
[ -f ~/.zsh-old ] && mv ~/.zsh-old ~/.zsh-very-old
[ -f ~/.zsh ] && mv ~/.zsh ~/.zsh-old
rm -rf ~/.zshrc-very-old
mv ~/.zshrc-old ~/.zshrc-very-old
mv ~/.zshrc ~/.zshrc-old
[ -f ~/.zshrc-very-old ] && rm -rf ~/.zshrc-very-old
[ -f ~/.zshrc-old ] && mv ~/.zshrc-old ~/.zshrc-very-old
[ -f ~/.zshrc ] && mv ~/.zshrc ~/.zshrc-old
cp -r $(pwd)/home/.gitconfig ~
cp -r $(pwd)/home/.p10k.zsh ~
@ -18,9 +18,3 @@ cp -r $(pwd)/home/.tmux.conf ~
touch ~/.local.zsh
ln ~/.zsh-distrobox/zshrc ~/.zshrc
# Install Vim Stuff
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'

View File

@ -1,8 +1,9 @@
#!/bin/bash
set -e
rm -rf ~/.zsh-very-old
mv ~/.zsh-old ~/.zsh-very-old
mv ~/.zsh ~/.zsh-old
[ -f ~/.zsh-very.old ] && rm -rf ~/.zsh-very-old
[ -f ~/.zsh-old ] && mv ~/.zsh-old ~/.zsh-very-old
[ -f ~/.zsh ] && mv ~/.zsh ~/.zsh-old
cp -r $(pwd)/home/.zsh-kali ~
cp -r $(pwd)/home/.vimrc ~
@ -11,10 +12,6 @@ cp -r $(pwd)/home/.config ~
cp -r $(pwd)/home/.tmux-server.conf ~/.tmux.conf
touch ~/.local.zsh
echo "source ~/.zsh-kali/zshrc" >> ~/.zshrc
# Install Vim Stuff
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
if [ tail -n 1 ~/.zshrc != "source ~/.zsh-kali/zshrc" ]; then
echo "source ~/.zsh-kali/zshrc" >> ~/.zshrc
fi

18
minimal.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
set -e
[ -f ~/.zsh-old ] && rm -rf ~/.zsh-old
[ -f ~/.zsh ] && mv ~/.zsh ~/.zsh-old
[ -f ~/.zshrc-old ] && rm -rf ~/.zshrc-old
[ -f ~/.zshrc ] && mv ~/.zshrc ~/.zshrc-old
cp -r $(pwd)/home/.zsh-server ~
cp -r $(pwd)/home/.vimrc ~
mkdir -p ~/.config/nvim
cp -r $(pwd)/home/.config/nvim/init.vim ~/.config/nvim
cp -r $(pwd)/home/.config/nvim/common.vim ~/.config/nvim
cp -r $(pwd)/home/.tmux-server.conf ~/.tmux.conf
touch ~/.local.zsh
ln ~/.zsh-server/zshrc ~/.zshrc

View File

@ -1,12 +1,13 @@
#!/bin/bash
set -e
rm -rf ~/.zsh-very-old
mv ~/.zsh-old ~/.zsh-very-old
mv ~/.zsh ~/.zsh-old
[ -f ~/.zsh-very.old ] && rm -rf ~/.zsh-very-old
[ -f ~/.zsh-old ] && mv ~/.zsh-old ~/.zsh-very-old
[ -f ~/.zsh ] && mv ~/.zsh ~/.zsh-old
rm -rf ~/.zshrc-very-old
mv ~/.zshrc-old ~/.zshrc-very-old
mv ~/.zshrc ~/.zshrc-old
[ -f ~/.zshrc-very-old ] && rm -rf ~/.zshrc-very-old
[ -f ~/.zshrc-old ] && mv ~/.zshrc-old ~/.zshrc-very-old
[ -f ~/.zshrc ] && mv ~/.zshrc ~/.zshrc-old
cp -r $(pwd)/home/.zsh-server ~
cp -r $(pwd)/home/.vimrc ~

View File

@ -1,12 +1,13 @@
#!/bin/bash
set -e
rm -rf ~/.zsh-very-old
mv ~/.zsh-old ~/.zsh-very-old
mv ~/.zsh ~/.zsh-old
[ -f ~/.zsh-very.old ] && rm -rf ~/.zsh-very-old
[ -f ~/.zsh-old ] && mv ~/.zsh-old ~/.zsh-very-old
[ -f ~/.zsh ] && mv ~/.zsh ~/.zsh-old
rm -rf ~/.zshrc-very-old
mv ~/.zshrc-old ~/.zshrc-very-old
mv ~/.zshrc ~/.zshrc-old
[ -f ~/.zshrc-very-old ] && rm -rf ~/.zshrc-very-old
[ -f ~/.zshrc-old ] && mv ~/.zshrc-old ~/.zshrc-very-old
[ -f ~/.zshrc ] && mv ~/.zshrc ~/.zshrc-old
cp -r $(pwd)/home/.p10k-standart-fonts.zsh ~/.p10k.zsh
cp -r $(pwd)/home/.zsh ~