Skip to content

Commit 955a362

Browse files
committed
code: Add new command install-deps
1 parent c9c4cf2 commit 955a362

3 files changed

Lines changed: 54 additions & 1 deletion

File tree

cmds/install-deps.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/**
2+
* Copyright (C) 2022 Jen-Chieh Shen
3+
*
4+
* This program is free software; you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation; either version 3, or (at your option)
7+
* any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with GNU Emacs; see the file COPYING. If not, write to the
16+
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17+
* Boston, MA 02110-1301, USA.
18+
*/
19+
20+
"use strict";
21+
22+
const util = require("../src/util");
23+
24+
exports.command = ['install-deps', 'install-dependencies'];
25+
exports.desc = 'automatically install package dependencies';
26+
27+
exports.handler = async (argv) => {
28+
await util.e_call(argv, 'install-deps');
29+
};

lisp/install-deps.el

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
;;; install-deps.el --- Automatically install package dependencies -*- lexical-binding: t; -*-
2+
3+
;;; Commentary:
4+
;;
5+
;; Command use to install package dependencies
6+
;;
7+
;; $ eask install-deps
8+
;;
9+
10+
;;; Code:
11+
12+
(load (expand-file-name
13+
"_prepare.el"
14+
(file-name-directory (nth 1 (member "-scriptload" command-line-args))))
15+
nil t)
16+
17+
(defun eask--help-install-deps ()
18+
"Print help if command failed."
19+
)
20+
21+
(eask-start
22+
(eask-pkg-init))
23+
24+
;;; install-deps.el ends here

lisp/install.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
(eask-load "package") ; load dist path
2525

2626
(defun eask--help-install ()
27-
"Print help if command failed"
27+
"Print help if command failed."
2828
)
2929

3030
(eask-start

0 commit comments

Comments
 (0)