summaryrefslogtreecommitdiff
path: root/dh-elpa.el
diff options
context:
space:
mode:
Diffstat (limited to 'dh-elpa.el')
-rw-r--r--dh-elpa.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/dh-elpa.el b/dh-elpa.el
index 7c68ce5..d8c776a 100644
--- a/dh-elpa.el
+++ b/dh-elpa.el
@@ -24,6 +24,8 @@
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
+(require 'package)
+
;; Originally package-unpack from package.el in Emacs 24.5
(defun dhelpa-unpack (pkg-desc destdir)
"Install the contents of the current buffer as a package."
@@ -56,4 +58,12 @@ Downloads and installs required packages as needed."
(dhelpa-unpack pkg-desc destdir)
pkg-desc))
+(defun dhelpa-batch-install-file ()
+ "install first command line argument (an emacs lisp file)
+into second command line argument"
+ (let ((el-file (car command-line-args-left))
+ (dest (cadr command-line-args-left)))
+ (with-temp-buffer
+ (insert-file-contents-literally el-file)
+ (dhelpa-install-from-buffer dest))))
;;; dh-elpa.el ends here