Skip to content

Instantly share code, notes, and snippets.

@spazm
Last active January 23, 2019 20:15
Show Gist options
  • Select an option

  • Save spazm/32c85c61d83d48dbc8a0b40e96a599bd to your computer and use it in GitHub Desktop.

Select an option

Save spazm/32c85c61d83d48dbc8a0b40e96a599bd to your computer and use it in GitHub Desktop.

Revisions

  1. spazm renamed this gist Jan 23, 2019. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. spazm revised this gist Jan 23, 2019. No changes.
  3. spazm created this gist Jan 23, 2019.
    11 changes: 11 additions & 0 deletions rc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    MY_SSH_AUTH_SOCK=$HOME/.ssh/ssh_auth_sock

    if [ -n "$SSH_AUTH_SOCK" ] ; then
    if [ -L $MY_SSH_AUTH_SOCK ] && [ -e $MY_SSH_AUTH_SOCK ]; then
    [ -n "$DEBUG" ] && echo "SSH_AUTH_SOCK is still valid"
    else
    [ -n "$DEBUG" ] && echo "linking SSH_AUTH_SOCK to $MY_SSH_AUTH_SOCK"
    ln -fs "$SSH_AUTH_SOCK" "$MY_SSH_AUTH_SOCK"
    fi
    fi
    [ -n "$DEBUG" ] && ls -l $MY_SSH_AUTH_SOCK