Browse Source

Added an example ssh config... NO IDENTIFYING OR PERSONAL INFO. Just an example to use on systems where I don't already have one configured.

master
Drew Short 9 years ago
parent
commit
bacd4db2ef
  1. 8
      home/.ssh/config
  2. 32
      scripts/bootstrap.sh

8
home/.ssh/config

@ -0,0 +1,8 @@
# example config file for SSH
# Sorry no secrets here ;P
#host sothr.com
# hostname example.host.name
# user example_user
# port example_port
# Protocol 2
# IdentityFile example_identity_file

32
scripts/bootstrap.sh

@ -22,6 +22,35 @@ link() {
ln -sf "$3" "$1/$2"
}
copy() {
# Only make a backup if an existing directory is there and is not a link
if [ -f "$1/$2" ] || [ -L "$1/$2" ]; then
# Allow passing true as third param to do backups
backup=true
if [ ! -z "$4" ]; then
backup=$4
fi
overwrite=false
if [ ! -z "$5" ]; then
overwrite=$5
fi
if $backup; then
mv "$1/$2" "$1/$2.old"
echo "Backed up original $2 to $1/$2.old"
else
if $overwrite; then
rm -r "$1/$2"
echo "removed original $2"
fi
fi
fi
# Should probably only do this is the source is newer
# Remove the old and copy the new
if $overwrite; then
cp -r "$3" "$1/$2"
fi
}
link_dir() {
# Only make a backup if an existing directory is there and is not a link
if [ -d "$1/$2" ] && [ ! -L "$1/$2" ]; then
@ -156,6 +185,9 @@ clone_git_repo $HOME/.tmux/plugins/tmux-resurrect https://github.com/tmux-plugin
# Configure .tmux.conf
link "$HOME" ".tmux.conf" "$DOTFILES_HOME/.tmux.conf"
# Copy example ssh config
copy "$HOME" ".ssh/config" "$DOTFILES_HOME/.ssh/config" false false
cd $GIT_DIR
# Create an auto updater for the dotfiles

Loading…
Cancel
Save