Pop v2
This commit is contained in:
parent
4794087837
commit
05061577ce
35
unixconf.sh
35
unixconf.sh
|
|
@ -1,20 +1,39 @@
|
|||
#!/bin/sh
|
||||
|
||||
gitlink="https://gitlab.cpy.re/florian/unixconf"
|
||||
|
||||
if (! test -d "$HOME/.vim" ); then
|
||||
mkdir "$HOME/.vim"
|
||||
fi
|
||||
|
||||
|
||||
musthaves="git vim ssh-agent urxvt"
|
||||
gitlink="https://gitlab.cpy.re/florian/unixconf/repository/archive.zip?ref=master"
|
||||
musthaves="zsh wget git vim ssh-agent urxvt unzip"
|
||||
|
||||
for musthave in $musthaves; do
|
||||
which "$musthave" >/dev/null 2>&1
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "You should install ${musthave}."
|
||||
echo "On Debian: apt-get install zsh wget git vim openssh-client rxvt-unicode unzip"
|
||||
exit
|
||||
fi
|
||||
done
|
||||
|
||||
# Vim setup
|
||||
if (! test -d "$HOME/.vim" ); then
|
||||
mkdir "$HOME/.vim"
|
||||
fi
|
||||
|
||||
# ZSH setup
|
||||
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
|
||||
|
||||
# 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/"
|
||||
|
||||
echo "Setting ZSH as default (/bin/zsh)."
|
||||
echo "exec zsh" >> "$HOME/.bashrc"
|
||||
|
|
|
|||
Loading…
Reference in New Issue