summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Agura2016-05-15 14:35:56 +0300
committerAlexander Agura2016-05-15 14:35:56 +0300
commit42dbe891a20fe90d22ec03e05213a298156cb14e (patch)
tree7442cf3a6a388c89ef9ea873896bf274dfdd5c46
downloadaur-42dbe891a20fe90d22ec03e05213a298156cb14e.tar.gz
Initial
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD20
-rw-r--r--find-the-command.install34
3 files changed, 71 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..87323fef73cb
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = find-the-command
+ pkgdesc = Interactive command-not-found hook for bash and zsh using the power of pacman
+ pkgver = 1.0.1
+ pkgrel = 1
+ url = https://github.com/agur4ik
+ install = find-the-command.install
+ arch = any
+ license = custom:WTFPL
+ depends = pacman>=5.0
+ optdepends = zsh: cool interactive shell with plenty of features
+ backup = usr/lib/systemd/system/pacman-files.service
+ backup = usr/lib/systemd/system/pacman-files.timer
+ source = https://github.com/agur4ik/find-the-command/archive/1.0.1.tar.gz
+ md5sums = c4cf0595b020dd7fa9da52944bd49a70
+
+pkgname = find-the-command
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..006c470b7caf
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,20 @@
+# Maintainer: Alexander Agura <agur4ik09@gmail.com>
+pkgname=find-the-command
+pkgver=1.0.1
+pkgrel=1
+pkgdesc="Interactive command-not-found hook for bash and zsh using the power of pacman"
+arch=('any')
+url="https://github.com/agur4ik"
+license=('custom:WTFPL')
+depends=('pacman>=5.0')
+optdepends=('zsh: cool interactive shell with plenty of features')
+backup=('usr/lib/systemd/system/pacman-files.service'
+ 'usr/lib/systemd/system/pacman-files.timer')
+install=find-the-command.install
+source=("https://github.com/agur4ik/$pkgname/archive/$pkgver.tar.gz")
+md5sums=(c4cf0595b020dd7fa9da52944bd49a70)
+
+package() {
+ cd "$pkgname-$pkgver"
+ cp -a * $pkgdir/
+}
diff --git a/find-the-command.install b/find-the-command.install
new file mode 100644
index 000000000000..04feb423bdc1
--- /dev/null
+++ b/find-the-command.install
@@ -0,0 +1,34 @@
+post_install() {
+ cat <<EOF
+ >> To enable command-not-found hook for your shell
+ >> add any of the following to your .bashrc or .zshrc file
+ >> depending on shell you use:
+ >> for bash (interactive):
+ source /usr/share/doc/find-the-command/ftc-interactive.bash
+ >> for non-interactive use:
+ source /usr/share/doc/find-the-command/ftc.bash
+ >> for zsh (interactive):
+ source /usr/share/doc/find-the-command/ftc-interactive.zsh
+ >> non-interactive:
+ source /usr/share/doc/find-the-command/ftc.zsh
+
+ >> It is necessary to create pacman files database, run
+ sudo pacman -Fy
+ >> You may also want to enable timer for regular
+ >> pacman files database update:
+ sudo systemctl enable pacman-files.timer
+EOF
+}
+
+post_upgrade() {
+ post_install
+}
+
+pre_remove() {
+ printf "\t>> Disabling pacman files systemd timer\n"
+ sytemctl disable pacman-files.timer
+}
+
+post_remove() {
+ printf "\t>> Don't for get to remove hook from your shell rc-file\n"
+}