[Surfraw-commits] [SCM] surfraw - a fast unix command line interface to WWW branch, master, updated. surfraw_2-2-5_1-219-g9f335f2

Ivy Foster joyfulgirl at archlinux.us
Thu Mar 29 19:59:35 UTC 2012


The following commit has been merged in the master branch:
commit 1531bef83538cd54f8df7f8900d457b0aeeda844
Author: Ivy Foster <joyfulgirl at archlinux.us>
Date:   Tue Jan 10 13:50:47 2012 -0500

    elvi/aur now uses HTTPS by default.
    
        - On the AUR, connecting via HTTP disables login.
        - Added switch -no-https to enable connection via plain HTTP

diff --git a/elvi/aur b/elvi/aur
index 77a2ee3..b51c4c9 100755
--- a/elvi/aur
+++ b/elvi/aur
@@ -14,6 +14,7 @@ w3_config_hook () {
     def   SURFRAW_aur_order    "a"
     def   SURFRAW_aur_language en
     defyn SURFRAW_aur_outdated 0
+    def   SURFRAW_aur_protocol "https"
     def   SURFRAW_aur_results  "$SURFRAW_results"
     def   SURFRAW_aur_search   name
     def   SURFRAW_aur_sort     name
@@ -32,6 +33,9 @@ Local options
   -language                     Search in your your language
                                 See aur.archlinux.org for available languages
                                 Default: en
+  -no-https                     Connect using HTTP, rather than HTTPS.
+                                This disables logging in.
+                                Default: use $SURFRAW_aur_protocol
   -order=ascending|descending   Organize in ascending or descending order
                                 Default: ascending
   -orphans                      Search orphaned packages
@@ -62,6 +66,7 @@ w3_parse_option_hook () {
     case "$opt" in
         -category=*) setopt   SURFRAW_aur_category "$optarg" ;;
         -language=*) setopt   SURFRAW_aur_language "$optarg" ;;
+        -no-https)   setopt   SURFRAW_aur_protocol "http" ;;
         -orphans*)   setopt   SURFRAW_aur_action   "Orphans=Orphans" ;;
         -order=d*)   setopt   SURFRAW_aur_order    d ;;
         -order=*)    setopt   SURFRAW_aur_order    a ;;
@@ -130,12 +135,12 @@ esac
 
 # w3_args now contains a list of arguments
 if test -z "$w3_args" && test "$SURFRAW_aur_action" = "Search=Go"; then
-    w3_browse_url "http://aur.archlinux.org/packages.php?setlang=${aur_lang}"
+    w3_browse_url "${SURFRAW_aur_protocol}://aur.archlinux.org/packages.php?setlang=${aur_lang}"
 else
     escaped_args=`w3_url_of_arg $w3_args`
     if [ "$SURFRAW_aur_outdated" = 1 ]; then
-        w3_browse_url "http://aur.archlinux.org/packages.php?O=0&L=0&detail=1&C=${aur_category}&K=${escaped_args}&SeB=${aur_search_by}&SB=${aur_sort_by}&SO=${SURFRAW_aur_order}&PP=${SURFRAW_aur_results}&do_${SURFRAW_aur_action}&outdated=on&setlang=${aur_lang}"
+        w3_browse_url "${SURFRAW_aur_protocol}://aur.archlinux.org/packages.php?O=0&L=0&detail=1&C=${aur_category}&K=${escaped_args}&SeB=${aur_search_by}&SB=${aur_sort_by}&SO=${SURFRAW_aur_order}&PP=${SURFRAW_aur_results}&do_${SURFRAW_aur_action}&outdated=on&setlang=${aur_lang}"
     else
-        w3_browse_url "http://aur.archlinux.org/packages.php?O=0&L=0&detail=1&C=${aur_category}&K=${escaped_args}&SeB=${aur_search_by}&SB=${aur_sort_by}&SO=${SURFRAW_aur_order}&PP=${SURFRAW_aur_results}&do_${SURFRAW_aur_action}&setlang=${aur_lang}"
+        w3_browse_url "${SURFRAW_aur_protocol}://aur.archlinux.org/packages.php?O=0&L=0&detail=1&C=${aur_category}&K=${escaped_args}&SeB=${aur_search_by}&SB=${aur_sort_by}&SO=${SURFRAW_aur_order}&PP=${SURFRAW_aur_results}&do_${SURFRAW_aur_action}&setlang=${aur_lang}"
     fi
 fi

-- 
surfraw -  a fast unix command line interface to WWW



More information about the Surfraw-commits mailing list