SHARE
TWEET

handler for git:// urls

a guest Jul 30th, 2011 40 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top