Guest User

Untitled

a guest
Jan 24th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #!/bin/bash
  2. # Echo and pbcopy the URL for the given SVN working copy
  3. # Usage: svnurl [path]
  4. # Add to your ~/.profile
  5.  
  6. function svnurl {
  7. if [ $# == 0 ]; then
  8. cwd=`pwd`
  9. else
  10. cwd="$1"
  11. fi
  12.  
  13. url=`svn info "$cwd" | grep 'URL:' | cut -c6-`
  14. echo $url | perl -e 'while(<>){ chomp; print; }' | pbcopy
  15. echo $url
  16. }
Add Comment
Please, Sign In to add comment