This commit is contained in:
Chocobozzz 2022-07-22 14:15:02 +02:00
parent f77a03561e
commit 940e9f3945
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 2 additions and 35 deletions

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
gitlink="https://gitlab.cpy.re/florian/unixconf/repository/archive.zip?ref=master" gitlink="https://gitlab.cpy.re/florian/unixconf/repository/archive.zip?ref=master"
musthaves="zsh wget git vim ssh-agent urxvt unzip ruby ctags" musthaves="zsh wget git vim unzip"
if [ ! -z ${1+x} ] && [ "$1" == "skip-install" ]; then if [ ! -z ${1+x} ] && [ "$1" == "skip-install" ]; then
musthaves="" musthaves=""
@ -11,7 +11,7 @@ for musthave in $musthaves; do
which "$musthave" >/dev/null 2>&1 which "$musthave" >/dev/null 2>&1
if [ "$?" -ne 0 ]; then if [ "$?" -ne 0 ]; then
echo "You should install ${musthave}." echo "You should install ${musthave}."
echo "On Ubuntu 14.04: apt-get install zsh wget git vim-nox openssh-client rxvt-unicode unzip ruby exuberant-ctags" echo "On Ubuntu: apt-get install zsh wget git vim unzip"
exit exit
fi fi
done done
@ -20,36 +20,3 @@ done
SHELL=zsh sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)" SHELL=zsh sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
echo "Setting ZSH as default." echo "Setting ZSH as default."
echo "exec zsh" >> "$HOME/.bash_profile" echo "exec zsh" >> "$HOME/.bash_profile"
# Copy configurations
tempdir="temp_$(date -I)"
cd "$HOME" || exit
mkdir "$tempdir"
cd "$tempdir" || exit
wget -O tempconf.zip "$gitlink"
unzip tempconf.zip
rm tempconf.zip
rootdir="$(ls)"
cd "$rootdir/configurations" || exit
cp .* "$HOME/"
# Vim setup
if (! test -d "$HOME/.vim" ); then
mkdir "$HOME/.vim"
fi
if (! test -d "$HOME/.vim/bundle" ); then
mkdir "$HOME/.vim/bundle"
fi
if (! test -d "$HOME/.vim/spell" ); then
mkdir "$HOME/.vim/spell"
fi
cd "$HOME/.vim/spell" || exit
wget http://ftp.vim.org/vim/runtime/spell/fr.utf-8.spl
git clone https://github.com/VundleVim/Vundle.vim.git "$HOME/.vim/bundle/vundle"
vim +PluginInstall +qall
cd "$HOME" || exit
rm -r "$tempdir"