Skip to content

Instantly share code, notes, and snippets.

@oraccha
Created July 4, 2011 19:52
Show Gist options
  • Save oraccha/1063848 to your computer and use it in GitHub Desktop.
Save oraccha/1063848 to your computer and use it in GitHub Desktop.
auto-install.el: ad-hoc fix to use curl instead of wget
--- auto-install.el.orig 2011-07-04 15:55:01.000000000 +0900
+++ auto-install.el 2011-07-04 16:09:02.000000000 +0900
@@ -700,7 +700,7 @@
:type 'boolean
:group 'auto-install)
-(defcustom auto-install-wget-command "wget"
+(defcustom auto-install-wget-command "curl"
"*Wget command. Use only if `auto-install-use-wget' is non-nil."
:type 'string
:group 'auto-install)
@@ -876,7 +876,8 @@
(defun auto-install-network-available-p (host)
(if auto-install-use-wget
- (eq (call-process auto-install-wget-command nil nil nil "-q" "--spider" host) 0)
+ ;(eq (call-process auto-install-wget-command nil nil nil "-q" "--spider" host) 0)
+ (eq (call-process auto-install-wget-command nil nil nil "-s" host) 0)
(with-current-buffer (url-retrieve-synchronously (concat "http://" host))
(prog1 (not (zerop (buffer-size)))
(kill-buffer (current-buffer))))))
@@ -1107,7 +1108,8 @@
(setq auto-install-download-url url)
(set-process-sentinel
(start-process "auto-install-wget" (current-buffer)
- auto-install-wget-command "-q" "-O-" "--no-check-certificate" url)
+ ;auto-install-wget-command "-q" "-O-" "--no-check-certificate" url)
+ auto-install-wget-command "-s" url)
(lexical-let ((handle-function handle-function))
(lambda (proc stat)
(auto-install-download-callback-continue (buffer-name (process-buffer proc))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment