Kaynağa Gözat

Remove download-file

pull/15/head
10sr 8 yıl önce
ebeveyn
işleme
bab2852afb
1 değiştirilmiş dosya ile 0 ekleme ve 45 silme
  1. +0
    -45
      emacs.el

+ 0
- 45
emacs.el Dosyayı Görüntüle

@@ -88,51 +88,6 @@ found, otherwise returns nil."
(message "Tetris loaded!"))
(message "Tetris found!"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; download library from web

(defun download-file (url path &optional ok-if-already-exists)
"Download file from URL and output to PATH.
IF OK-IF-ALREADY-EXISTS is true force download."
(let ((curl (executable-find "curl"))
(wget (executable-find "wget")))
(cond (wget
(if (and (not ok-if-already-exists)
(file-exists-p path))
nil
(and (eq 0
(call-process wget
nil
nil
nil
"-O"
path
url
))
path)))
(curl
(if (and (not ok-if-already-exists)
(file-exists-p path))
nil
(and (eq 0
(call-process curl
nil
nil
nil
"--output"
path
"-L"
url
))
path)))
(t
(ignore-errors
(require 'url)
(url-copy-file url
path
ok-if-already-exists)
path)))))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; package



Yükleniyor…
İptal
Kaydet