emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/system-packages 6d0ebd5 008/117: All working, working o


From: Stefan Monnier
Subject: [elpa] externals/system-packages 6d0ebd5 008/117: All working, working on listing installed packages
Date: Fri, 14 Dec 2018 17:01:58 -0500 (EST)

branch: externals/system-packages
commit 6d0ebd570f93d203980dc58eabf648f6079e952c
Author: Alex Branham <address@hidden>
Commit: Alex Branham <address@hidden>

    All working, working on listing installed packages
---
 system-packages.el | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/system-packages.el b/system-packages.el
index 3d2b1d6..2e16ba3 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -51,7 +51,10 @@
   "String containing the package manager to use. Currently
     system-packages supports pacman, apt, and home-brew.")
 
-(defvar system-packages-usesudo t
+(defvar system-packages-usesudo
+  (if (executable-find "pacman") t
+    (if (executable-find "apt") t
+      (if (executable-find "brew") nil)))
   "If non-nil, system-packages will use sudo for appropriate
   commands")
 
@@ -116,5 +119,15 @@
     (if (equal system-packages-usesudo t)
         (async-shell-command (mapconcat 'identity (list "sudo" command) " "))
       (async-shell-command (mapconcat 'identity (list command) " ")))))
+
+;; (defun system-packages-list-installed-packages ()
+;;   "List explicitly installed packages. With the prefix argument,
+;; list all installed packages."
+;;   (interactive)
+;;   (let ((command
+;;          (if (equal system-packages-packagemanager "pacman") "pacman -"
+;;            (if (equal system-packages-packagemanager "apt") "apt-cache 
search"
+;;              (if (equal system-packages-packagemanager "brew") "brew 
search")))))
+;;     (async-shell-command (mapconcat 'identity (list command pack) " "))))
                
 (provide 'system-packages)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]