1
0
mirror of https://github.com/gryf/vmstrap.git synced 2025-12-18 20:10:28 +01:00

Run bootstrap without changing directory

This commit is contained in:
2021-04-12 13:22:33 +02:00
parent 2554ca0655
commit 08ca8049c1

View File

@@ -10,6 +10,9 @@
set -e set -e
DIR=$(dirname $BASH_SOURCE[0])
if command -v lsb_release > /dev/null 2>&1; then if command -v lsb_release > /dev/null 2>&1; then
DISTRO_ID=$(lsb_release -i | cut -f 2 -d ':' | xargs \ DISTRO_ID=$(lsb_release -i | cut -f 2 -d ':' | xargs \
| tr '[:upper:]' '[:lower:]') | tr '[:upper:]' '[:lower:]')
@@ -267,12 +270,12 @@ tmux_conf() {
} }
common_conf() { common_conf() {
cp .bash_prompt ~/ cp "${DIR}/.bash_prompt" ~/
cp .tmux.conf ~/ cp "${DIR}/.tmux.conf" ~/
tmux_conf tmux_conf
cp .gitconfig ~/ cp "${DIR}/.gitconfig" ~/
cp cleanup.sh ~/ cp "${DIR}/cleanup.sh" ~/
for i in $(seq 0 3); do for i in $(seq 0 3); do
ifname=$(ip -j a|jq -r .[$i].ifname) ifname=$(ip -j a|jq -r .[$i].ifname)
@@ -300,9 +303,9 @@ common_conf() {
git clone https://github.com/gryf/.vim ~/.vim git clone https://github.com/gryf/.vim ~/.vim
# populate plugins # populate plugins
vim -c ':PlugUpdate' -c ':qa!' vim -c ':PlugUpdate' -c ':qa!'
vim -c ':qa!'
# showmarks is a stubborn one # showmarks is a stubborn one
mkdir ~/.vim/bundle/ShowMarks/doc mkdir ~/.vim/bundle/ShowMarks/doc
vim -c ':qa!'
fi fi
# make current user sudo passwordless # make current user sudo passwordless
@@ -312,7 +315,7 @@ common_conf() {
# clone devstack # clone devstack
git clone https://opendev.org/openstack/devstack ~/devstack git clone https://opendev.org/openstack/devstack ~/devstack
cp kuryr.conf ~/devstack/local.conf cp "${DIR}/kuryr.conf" ~/devstack/local.conf
# get k9s # get k9s
wget "https://github.com/derailed/k9s/releases/download/"` wget "https://github.com/derailed/k9s/releases/download/"`