[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/system-packages 4e7e9e2 006/117: Working install comman
From: |
Stefan Monnier |
Subject: |
[elpa] externals/system-packages 4e7e9e2 006/117: Working install command |
Date: |
Fri, 14 Dec 2018 17:01:58 -0500 (EST) |
branch: externals/system-packages
commit 4e7e9e2756abcba4c913830faff1fe1f88304401
Author: Alex Branham <address@hidden>
Commit: Alex Branham <address@hidden>
Working install command
---
system-packages.el | 64 ++++++++++++++++++++++++++++++++++++++++--------------
1 file changed, 48 insertions(+), 16 deletions(-)
diff --git a/system-packages.el b/system-packages.el
index 6946067..4cd8d88 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -1,10 +1,49 @@
- ;;; system-packages.el --- functions to manage system packages
+;;; system-packages.el --- functions to manage system packages
-;; Copyright
+;; Copyright (C) 2016 J. Alexander Branham
-;; Author: J. Alexander Branham
+;; Author: J. Alexander Branham <address@hidden>
+;; Maintainer: J. Alexander Branham <address@hidden>
+;; URL: https://github.com/jabranham/system-packages
;; Version: 0.1
+;; This file is not part of GNU Emacs.
+
+;;; License:
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see
+;; <http://www.gnu.org/licenses/>
+
+;;; Commentary:
+
+;; This is a package to manage installed system packages. Useful
+;; functions include installing packages, removing packages, listing
+;; installed packages, and others.
+
+;; Usage:
+
+;; (require 'system-packages)
+;;
+
+;;; Code:
+
+(defgroup system-packages nil
+ "Manages system packages"
+ :tag "System Packages"
+ :prefix "system-packages"
+ :group 'packages)
+
(defvar system-packages-packagemanager
(if (executable-find "pacman") "pacman"
(if (executable-find "apt") "apt"
@@ -16,24 +55,16 @@
"If non-nil, system-packages will use sudo for appropriate
commands")
-
(defun system-packages-install (pack)
"Installs system packages"
(interactive "sWhat package to install?")
(let ((command
- (cond ((equal system-packages-packagemanager "pacman") "pacman -S")
- ((equal system-packages-packagemanager "apt") "apt-get install")
- ((equal system-packages-packagemanager "brew") "brew
install"))))
+ (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-usesudo t)
- (async-shell-command
- (mapconcat 'identity
- '("sudo" command pack)
- " "))
- (async-shell-command
- (mapconcat 'identity
- '(command pack)
- " ")))))
-
+ (async-shell-command (mapconcat 'identity (list "sudo" command pack) "
"))
+ (async-shell-command (mapconcat 'identity '(command pack) " ")))))
(defun system-packages-search ()
"Search for system packages"
@@ -78,3 +109,4 @@
(async-shell-command (concat "sudo " command))
(async-shell-command command))
+(provide 'system-packages)
- [elpa] branch externals/system-packages created (now ce23c0e), Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages 2737c65 003/117: Modifications, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages 7c17a8b 005/117: Adds function to remove orphaned packages, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages bccbab3 002/117: Initial commit, Stefan Monnier, 2018/12/14
- [elpa] externals/system-packages 4e7e9e2 006/117: Working install command,
Stefan Monnier <=
- [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