[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/sqlite3 a69ff5a456 11/62: github installation function add
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/sqlite3 a69ff5a456 11/62: github installation function added |
Date: |
Tue, 14 Mar 2023 11:01:45 -0400 (EDT) |
branch: elpa/sqlite3
commit a69ff5a456f141a4139300530207e815456da063
Author: Y. N. Lo <gordonynlo@yahoo.com>
Commit: Y. N. Lo <gordonynlo@yahoo.com>
github installation function added
---
sqlite3-api.el | 43 ++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 42 insertions(+), 1 deletion(-)
diff --git a/sqlite3-api.el b/sqlite3-api.el
index 948a19971d..fdc67201ad 100644
--- a/sqlite3-api.el
+++ b/sqlite3-api.el
@@ -11,10 +11,51 @@
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+;; sqlite-* constants
(require 'sqlite3-api-constants)
-(require 'sqlite3-api-module)
+;; Dynamic module
+(require 'sqlite3-api-module nil t)
+
+;; Error signals raised by the dynamic module
(define-error 'db-error "Database Error")
(define-error 'sql-error "SQL Error")
+;; Install dynamic module
+(defun sqlite3-api-install-dynamic-module ()
+ "Install sqlite3-api-module from github."
+ (interactive)
+ (let ((log-buffer "*sqlite3-api-install-log*")
+ (err-buffer "*sqlite3-api-install-error*")
+ (tmp-dir (make-temp-file "sqlite3-api" t))
+ (cur-dir default-directory)
+ (repo-url "https://github.com/pekingduck/emacs-sqlite3-api")
+ (tar))
+ (unwind-protect
+ (condition-case err
+ (progn
+ (when (get-buffer log-buffer)
+ (kill-buffer log-buffer))
+ (when (get-buffer err-buffer)
+ (kill-buffer err-buffer))
+ (cd tmp-dir)
+ (shell-command (format "git clone %s" repo-url)
+ log-buffer err-buffer)
+ (cd "emacs-sqlite3-api")
+ ;; compile the module and create a tar archive
+ (shell-command "make module" log-buffer err-buffer)
+ ;; A file called "MODULE" is created in the previous step
+ ;; and it contains the name of the tar file
+ (setq tar (with-temp-buffer
+ (insert-file-contents "MODULE")
+ (buffer-substring-no-properties
+ (point-min)
+ (1- (point-max)))))
+ (package-install-file tar)
+ (message "%s successfully installed" (file-name-base tar)))
+ (error
+ (message "Installation aborted: %S" err)))
+ (delete-directory tmp-dir t)
+ (cd cur-dir))))
+
(provide 'sqlite3-api)
- [nongnu] elpa/sqlite3 0bae137c63 26/62: LIB and INC added to Makefile, (continued)
- [nongnu] elpa/sqlite3 0bae137c63 26/62: LIB and INC added to Makefile, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 9e6dbe5d37 15/62: fixed typo, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 0131cc617d 19/62: python3 -> python, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 7abb3c6f70 28/62: fixed callback example; added Homebrew linkage, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 71d35506ec 07/62: minor adjustment to Makefile, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 a2d5e39133 43/62: Removed unused codes from consts.c, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 b72c2c40d9 44/62: Better handling of SQLite codes in consts.c, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 a51467b031 04/62: added test for Emacs 25.1, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 1f1f7ab2db 09/62: added package creation section, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 1b7b1fc03f 10/62: fixed module installation bug, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 a69ff5a456 11/62: github installation function added,
ELPA Syncer <=
- [nongnu] elpa/sqlite3 47391311a9 12/62: edited sqlite3-api.el to adhere to melpa guidelines, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 723787e6d9 21/62: added 'make install', ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 77e719fb88 24/62: better comments, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 0dfe8e07df 30/62: 26.1 test added, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 b8fc4e2fae 35/62: TOC, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 15697800f8 37/62: Fixed changelog, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 9a2dbb9dc2 38/62: fixed typo, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 f2c30e8b86 16/62: removed 'Package Version', ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 bdb5832e27 17/62: removed 'Package Version' from sqlite3-api-constants.el, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 639ffb711e 20/62: all .el files removed., ELPA Syncer, 2023/03/14