Mercurial > index.cgi > dotfiles
view .shared/b @ 274:02a3d7c46b2b
Better 'ds end' functionality, and ability to share a remote environment more easily
author | Steve Huston <huston@srhuston.net> |
---|---|
date | Fri, 26 Apr 2024 12:02:56 -0400 |
parents | 61b830d34016 |
children |
line wrap: on
line source
#!/bin/bash # Bootstrap file - pulls everything else through the web server and sets up an # environment. Load with: # export DOTSHARE_PORT=<port> ; eval "$(curl http://localhost:${DOTSHARE_PORT}/b)" # These are the files we'll pull over from the dotshare directory; this way # that directory can collect other things if needed, but we only pull what we # need to bootstrap (the vim plugins, for example, can be loaded the typical # way, or if we really need to a manual pull can get them all) FILES="bash_prompt gitconfig screenrc shared_bashrc .vim/vimrc .vim/gvimrc .vim/autoload/plug.vim" # We need a temporary directory where we can put things. We should assume # $HOME exists and that's where we're going to make the temp directory. This # way when we logout, everything can be cleaned up. DOTHOME=`mktemp -d ${HOME}/.ds-tmp.XXXXXX` || exit 255 # Now make sure to clean this up when we leave trap "rm -rf $DOTHOME" 0 for F in $FILES ; do curl --create-dirs -so ${DOTHOME}/$F http://localhost:${DOTSHARE_PORT}/$F done cat > ${DOTHOME}/.env-setup << EOF export DOTHOME=${DOTHOME} source ${DOTHOME}/shared_bashrc EOF source ${DOTHOME}/.env-setup