mirror of
https://github.com/gryf/vmstrap.git
synced 2025-12-20 12:58:05 +01:00
Added check for existence of items
This commit is contained in:
@@ -20,8 +20,10 @@ export EDITOR="vim"
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
# 5. install tools from pypi
|
# 5. install tools from pypi
|
||||||
sudo pip install pip --upgrade
|
if $(pip list |grep -e rainbow -e remote-pdb|wc -l|grep -qv 2); then
|
||||||
sudo pip install remote_pdb rainbow
|
sudo pip install pip --upgrade
|
||||||
|
sudo pip install remote_pdb rainbow
|
||||||
|
fi
|
||||||
|
|
||||||
# 6. copy configuration for bash, git, tmux
|
# 6. copy configuration for bash, git, tmux
|
||||||
sudo cp .bash_prompt ~/
|
sudo cp .bash_prompt ~/
|
||||||
@@ -30,16 +32,18 @@ sudo cp .gitconfig ~/
|
|||||||
echo '. ~/.bash_prompt' >> ~/.bashrc
|
echo '. ~/.bash_prompt' >> ~/.bashrc
|
||||||
|
|
||||||
# 7. get my vim config
|
# 7. get my vim config
|
||||||
git clone https://github.com/gryf/.vim ~/.vim
|
if [ ! -d ~/.vim ]; then
|
||||||
# populate plugins
|
git clone https://github.com/gryf/.vim ~/.vim
|
||||||
vim -c ':PlugUpdate' -c ':qa!'
|
# populate plugins
|
||||||
# showmarks is a stubborn one
|
vim -c ':PlugUpdate' -c ':qa!'
|
||||||
mkdir ~/.vim/bundle/ShowMarks/doc
|
# showmarks is a stubborn one
|
||||||
|
mkdir ~/.vim/bundle/ShowMarks/doc
|
||||||
|
fi
|
||||||
|
|
||||||
# make current user sudo passwordless
|
# make current user sudo passwordless
|
||||||
cat <<EOF >>/tmp/${USER}.sudo
|
if [ -z "$(sudo grep "${USER}" /etc/sudoers)" ]; then
|
||||||
${USER} ALL = (ALL) NOPASSWD: ALL
|
sudo "echo ${USER} ALL = (ALL) NOPASSWD: ALL >> /etc/sudoers"
|
||||||
EOF
|
fi
|
||||||
sudo mv /tmp/${USER}.sudo /etc/sudoers.d/
|
|
||||||
|
|
||||||
git clone https://opendev.org/openstack/devstack
|
# clone devstack
|
||||||
|
git clone https://opendev.org/openstack/devstack ~/
|
||||||
|
|||||||
Reference in New Issue
Block a user