[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/system-packages 2f0df07 010/117: Adds support for pacau
From: |
Stefan Monnier |
Subject: |
[elpa] externals/system-packages 2f0df07 010/117: Adds support for pacaur |
Date: |
Fri, 14 Dec 2018 17:01:59 -0500 (EST) |
branch: externals/system-packages
commit 2f0df078e8a32f91dfa97fa60ff774fa3b68eaca
Author: Alex Branham <address@hidden>
Commit: Alex Branham <address@hidden>
Adds support for pacaur
---
system-packages.el | 35 ++++++++++++++++++++++-------------
1 file changed, 22 insertions(+), 13 deletions(-)
diff --git a/system-packages.el b/system-packages.el
index 797975c..cd0c50f 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -45,16 +45,19 @@
:group 'packages)
(defvar system-packages-packagemanager
- (if (executable-find "pacman") "pacman"
- (if (executable-find "apt") "apt"
- (if (executable-find "brew") "brew")))
+ (if (executable-find "pacaur") "pacaur"
+ (if (executable-find "pacman") "pacman"
+ (if (executable-find "apt") "apt"
+ (if (executable-find "brew") "brew"))))
"String containing the package manager to use. Currently
- system-packages supports pacman, apt, and home-brew.")
+ system-packages supports pacman, pacaur, apt, and
+ homebrew.")
(defvar system-packages-usesudo
- (if (executable-find "pacman") t
- (if (executable-find "apt") t
- (if (executable-find "brew") nil)))
+ (if (equal system-packages-packagemanager "pacman") t
+ (if (equal system-packages-packagemanager "apt") t
+ (if (equal system-packages-packagemanager "brew") nil
+ (if (equal system-packages-packagemanager "pacaur") nil))))
"If non-nil, system-packages will use sudo for appropriate
commands")
@@ -66,9 +69,10 @@
"Installs system packages"
(interactive "sWhat package to install?")
(let ((command
+ (if (equal system-packages-packagemanager "pacaur") "pacaur -S"
(if (equal system-packages-packagemanager "pacman") "pacman -S"
(if (equal system-packages-packagemanager "apt") "apt-get install"
- (if (equal system-packages-packagemanager "brew") "brew
install")))))
+ (if (equal system-packages-packagemanager "brew") "brew
install"))))))
(if (equal system-packages-usesudo t)
(async-shell-command (mapconcat 'identity (list "sudo" command pack) "
"))
(async-shell-command (mapconcat 'identity (list command pack) " ")))))
@@ -77,18 +81,20 @@
"Search for system packages"
(interactive "sSearch string?")
(let ((command
+ (if (equal system-packages-packagemanager "pacaur") "pacaur -Ss"
(if (equal system-packages-packagemanager "pacman") "pacman -Ss"
(if (equal system-packages-packagemanager "apt") "apt-cache search"
- (if (equal system-packages-packagemanager "brew") "brew
search")))))
+ (if (equal system-packages-packagemanager "brew") "brew
search"))))))
(async-shell-command (mapconcat 'identity (list command pack) " "))))
(defun system-packages-uninstall (pack)
"Uninstalls installed system packages"
(interactive "sWhat package to uninstall?")
(let ((command
+ (if (equal system-packages-packagemanager "pacaur") "pacaur -Rs"
(if (equal system-packages-packagemanager "pacman") "pacman -Rs"
(if (equal system-packages-packagemanager "apt") "apt-get remove"
- (if (equal system-packages-packagemanager "brew") "brew
uninstall")))))
+ (if (equal system-packages-packagemanager "brew") "brew
uninstall"))))))
(if (equal system-packages-usesudo t)
(async-shell-command (mapconcat 'identity (list "sudo" command pack) "
"))
(async-shell-command (mapconcat 'identity (list command pack) " ")))))
@@ -101,9 +107,10 @@
"Updates installed system packages"
(interactive)
(let ((command
+ (if (equal system-packages-packagemanager "pacaur") "pacaur -Syu"
(if (equal system-packages-packagemanager "pacman") "pacman -Syu"
(if (equal system-packages-packagemanager "apt") "apt-get update &&
sudo apt-get upgrade"
- (if (equal system-packages-packagemanager "brew") "brew update &&
brew upgrade")))))
+ (if (equal system-packages-packagemanager "brew") "brew update &&
brew upgrade"))))))
(if (equal system-packages-usesudo t)
(async-shell-command (mapconcat 'identity (list "sudo" command) " "))
(async-shell-command (mapconcat 'identity (list command) " ")))))
@@ -114,8 +121,9 @@
(if (equal system-packages-packagemanager "brew")
(error "Not supported on homebrew"))
(let ((command
+ (if (equal system-packages-packagemanager "pacaur") "pacman -Rns
$(pacman -Qtdq)"
(if (equal system-packages-packagemanager "pacman") "pacman -Rns
$(pacman -Qtdq)"
- (if (equal system-packages-packagemanager "apt") "apt-get
autoremove"))))
+ (if (equal system-packages-packagemanager "apt") "apt-get
autoremove")))))
(if (equal system-packages-usesudo t)
(async-shell-command (mapconcat 'identity (list "sudo" command) " "))
(async-shell-command (mapconcat 'identity (list command) " ")))))
@@ -127,7 +135,8 @@ list all installed packages."
(if (equal system-packages-packagemanager "apt")
(error "Not supported on apt systems"))
(let ((command
- (if (and arg (equal system-packages-packagemanager "pacman")) "pacman
-Q"
+ (if (and arg (or (equal system-packages-packagemanager "pacaur")
+ (equal system-packages-packagemanager "pacman")))
"pacman -Q"
(if (equal system-packages-packagemanager "pacman") "pacman -Qe"
(if (equal system-packages-packagemanager "brew") "brew list")))))
(async-shell-command command)))
- [elpa] externals/system-packages 7553ef9 004/117: More work..., (continued)
- [elpa] externals/system-packages 7553ef9 004/117: More work..., Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages 6d0ebd5 008/117: All working, working on listing installed packages, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages a6e053e 011/117: Fix parens, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages 34f898e 007/117: A wild functional package appears!, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages fd49fc8 012/117: Fixes list function, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages d2884f5 018/117: Use idiomatic prompts in interactive commands, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages eef3e8e 017/117: Fix Arch Linux package list (explicit) commands, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages a6dcd04 015/117: Refactor the package manager specific commands into a defconst, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages 07c4faa 026/117: Use defcustom for customizable variable, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages 47cef47 023/117: Adds support for aptitude, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages 2f0df07 010/117: Adds support for pacaur,
Stefan Monnier <=
- [elpa] externals/system-packages 1c1faa4 016/117: Merge pull request #1 from jiegec/master, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages b05fc13 024/117: Add package footer for packaging convention, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages 5b3f7f5 036/117: Whether to use sudo or not should be defcustom not defvar, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages 71af8a5 013/117: Adds some documentation, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages da5835a 027/117: Merge pull request #9 from syohex/fix-package, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages a831a7e 033/117: Fix function names, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages 6997440 031/117: Adds list-dependencies-of command, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages 4efd204 042/117: Use dedicated buffer, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages 749c053 009/117: Finishes list installed packages function, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages 38f68ed 019/117: Merge pull request #2 from juergenhoetzel/master, Stefan Monnier, 2018/12/14