annotate .shared/b @ 265:df0b24d4fabd

Think I'm ready to check this all in now; shared dotfiles that can be "sent" through an SSH connection to be used and cleaned up when finished.
author Steve Huston <huston@srhuston.net>
date Wed, 24 Apr 2024 16:15:40 -0400
parents
children ae940a45bfff
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
265
df0b24d4fabd Think I'm ready to check this all in now; shared dotfiles that can be "sent"
Steve Huston <huston@srhuston.net>
parents:
diff changeset
1 #!/bin/bash
df0b24d4fabd Think I'm ready to check this all in now; shared dotfiles that can be "sent"
Steve Huston <huston@srhuston.net>
parents:
diff changeset
2 # Bootstrap file - pulls everything else through the web server and sets up an
df0b24d4fabd Think I'm ready to check this all in now; shared dotfiles that can be "sent"
Steve Huston <huston@srhuston.net>
parents:
diff changeset
3 # environment. Load with:
df0b24d4fabd Think I'm ready to check this all in now; shared dotfiles that can be "sent"
Steve Huston <huston@srhuston.net>
parents:
diff changeset
4 # P=<port> eval "$(curl http://localhost:<port>/b)"
df0b24d4fabd Think I'm ready to check this all in now; shared dotfiles that can be "sent"
Steve Huston <huston@srhuston.net>
parents:
diff changeset
5
df0b24d4fabd Think I'm ready to check this all in now; shared dotfiles that can be "sent"
Steve Huston <huston@srhuston.net>
parents:
diff changeset
6 # These are the files we'll pull over from the dotshare directory; this way
df0b24d4fabd Think I'm ready to check this all in now; shared dotfiles that can be "sent"
Steve Huston <huston@srhuston.net>
parents:
diff changeset
7 # that directory can collect other things if needed, but we only pull what we
df0b24d4fabd Think I'm ready to check this all in now; shared dotfiles that can be "sent"
Steve Huston <huston@srhuston.net>
parents:
diff changeset
8 # need to bootstrap (the vim plugins, for example, can be loaded the typical
df0b24d4fabd Think I'm ready to check this all in now; shared dotfiles that can be "sent"
Steve Huston <huston@srhuston.net>
parents:
diff changeset
9 # way, or if we really need to a manual pull can get them all)
df0b24d4fabd Think I'm ready to check this all in now; shared dotfiles that can be "sent"
Steve Huston <huston@srhuston.net>
parents:
diff changeset
10 FILES="bash_prompt screenrc shared_bashrc .vim/vimrc .vim/gvimrc .vim/autoload/plug.vim"
df0b24d4fabd Think I'm ready to check this all in now; shared dotfiles that can be "sent"
Steve Huston <huston@srhuston.net>
parents:
diff changeset
11
df0b24d4fabd Think I'm ready to check this all in now; shared dotfiles that can be "sent"
Steve Huston <huston@srhuston.net>
parents:
diff changeset
12 # We need a temporary directory where we can put things. We should assume
df0b24d4fabd Think I'm ready to check this all in now; shared dotfiles that can be "sent"
Steve Huston <huston@srhuston.net>
parents:
diff changeset
13 # $HOME exists and that's where we're going to make the temp directory. This
df0b24d4fabd Think I'm ready to check this all in now; shared dotfiles that can be "sent"
Steve Huston <huston@srhuston.net>
parents:
diff changeset
14 # way when we logout, everything can be cleaned up.
df0b24d4fabd Think I'm ready to check this all in now; shared dotfiles that can be "sent"
Steve Huston <huston@srhuston.net>
parents:
diff changeset
15 DOTHOME=`mktemp -d ${HOME}/.ds-tmp.XXXXXX` || exit 255
df0b24d4fabd Think I'm ready to check this all in now; shared dotfiles that can be "sent"
Steve Huston <huston@srhuston.net>
parents:
diff changeset
16
df0b24d4fabd Think I'm ready to check this all in now; shared dotfiles that can be "sent"
Steve Huston <huston@srhuston.net>
parents:
diff changeset
17 # Now make sure to clean this up when we leave
df0b24d4fabd Think I'm ready to check this all in now; shared dotfiles that can be "sent"
Steve Huston <huston@srhuston.net>
parents:
diff changeset
18 trap "rm -rf $DOTHOME" 0
df0b24d4fabd Think I'm ready to check this all in now; shared dotfiles that can be "sent"
Steve Huston <huston@srhuston.net>
parents:
diff changeset
19
df0b24d4fabd Think I'm ready to check this all in now; shared dotfiles that can be "sent"
Steve Huston <huston@srhuston.net>
parents:
diff changeset
20 for F in $FILES ; do
df0b24d4fabd Think I'm ready to check this all in now; shared dotfiles that can be "sent"
Steve Huston <huston@srhuston.net>
parents:
diff changeset
21 curl --create-dirs -so ${DOTHOME}/$F http://localhost:${DOTSHARE_PORT}/$F
df0b24d4fabd Think I'm ready to check this all in now; shared dotfiles that can be "sent"
Steve Huston <huston@srhuston.net>
parents:
diff changeset
22 done
df0b24d4fabd Think I'm ready to check this all in now; shared dotfiles that can be "sent"
Steve Huston <huston@srhuston.net>
parents:
diff changeset
23
df0b24d4fabd Think I'm ready to check this all in now; shared dotfiles that can be "sent"
Steve Huston <huston@srhuston.net>
parents:
diff changeset
24 export DOTHOME
df0b24d4fabd Think I'm ready to check this all in now; shared dotfiles that can be "sent"
Steve Huston <huston@srhuston.net>
parents:
diff changeset
25 source ${DOTHOME}/shared_bashrc