Dotfiles & curl installation

This commit is contained in:
Sonny 2017-06-17 20:40:54 +02:00
parent 639e4dbf2d
commit 06e8f1e385
2 changed files with 16 additions and 15 deletions

View file

@ -7,11 +7,10 @@ function get_path {
function user_config { function user_config {
if [ 'dpkg -l curl' == 1 ]; then CURL='dpkg-query -l | grep curl | wc -l'
if [ "$CURL" > 0 ]; then
echo 'Curl not installed, installing....' echo 'Curl not installed, installing....'
apt-get install -y curl apt-get install -y curl
#echo 'Exiting...'
#exit 1
fi fi
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
@ -27,17 +26,5 @@ function user_config {
} }
function powerline_fonts {
git clone https://github.com/powerline/fonts.git $HOME/.fonts
$HOME/.fonts/install.sh
}
user_config user_config
echo 'Dont forget to run :PlugInstall inside vim!' echo 'Dont forget to run :PlugInstall inside vim!'
echo -n 'Extra fonts? [y/n]'
read FONTS
if [ "$FONTS" == "y" ] ;then
powerline_fonts
fi

View file

@ -33,6 +33,8 @@ function create_container {
echo "Starting container first time, enter root pass" echo "Starting container first time, enter root pass"
systemd-nspawn -D $CONTAINER_PATH passwd systemd-nspawn -D $CONTAINER_PATH passwd
dotfiles $CONTAINER_PATH
} }
function add_ssh { function add_ssh {
@ -45,4 +47,16 @@ function add_ssh {
sed -i 's/^#PermitRootLogin .*/PermitRootLogin yes/' $1/etc/ssh/sshd_config sed -i 's/^#PermitRootLogin .*/PermitRootLogin yes/' $1/etc/ssh/sshd_config
} }
function dotfiles {
echo -n "Add dotfiles? [y/n]: "
read DOTFILES
if [ "$DOTFILES" == "y" ] ;then
systemd-nspawn -D $1 git clone https://www.github.com/SonnyBA/dotfiles.git $1/root/dotfiles
systemd-nspawn -D $1 $1/root/dotfiles/initialize_script
elif [ -z "$SSH_SERVER" ] ;then
echo "Not cloning anything"
fi
}
create_container create_container