Advertisement
Guest User

handler for git:// urls

a guest
Jul 30th, 2011
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #!/bin/sh
  2. if test -z "$1"
  3. then
  4. echo "URL must be specified" >&2
  5. exit 1
  6. fi
  7.  
  8. if test "$#" -ne 1
  9. then
  10. echo "Must have exactly one argument (the URL)" >&2
  11. exit 1
  12. fi
  13.  
  14. # kdialog (and KDE in general) is nicer, but lacks a 'directory save' filter
  15. DIR="$(zenity --title="select or create an empty directory to clone into" --file-selection --directory --save)" || exit 0
  16. ERR="$(git clone "$1" "$DIR" 2>&1)" || zenity --error --text="$ERR"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement