diff options
author | David Bremner <david@tethera.net> | 2015-07-11 12:30:30 +0200 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2015-07-11 12:31:38 +0200 |
commit | e420965f95f6721d76c73653c518b12c92165a83 (patch) | |
tree | cc190ad95c1ba58f847b7db8c10f9176a6437f03 | |
parent | 59ae5d66a3780ac35c7a5efdbef377714db66e27 (diff) |
add single file batch installer function
-rw-r--r-- | dh-elpa.el | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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 |