summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO13
-rw-r--r--PKGBUILD16
-rw-r--r--bash-zsh-insulter.install25
3 files changed, 54 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..1f4fe3739858
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,13 @@
+pkgbase = bash-zsh-insulter
+ pkgdesc = Insults the user when typing wrong command. For Bash v4+ or Zsh
+ pkgver = 1
+ pkgrel = 1
+ url = https://github.com/hkbakke/bash-insulter
+ install = bash-zsh-insulter.install
+ arch = any
+ license = MIT
+ source = bash.command-not-found::https://raw.githubusercontent.com/hkbakke/bash-insulter/master/src/bash.command-not-found
+ md5sums = 757b466982999fe563256ed0e3d6e6bb
+
+pkgname = bash-zsh-insulter
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..108501950661
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,16 @@
+# Maintainer: koraynilay <koray.fra@gmail.com>
+_filename="bash.command-not-found"
+pkgname=bash-zsh-insulter
+pkgver=1
+pkgrel=1
+pkgdesc="Insults the user when typing wrong command. For Bash v4+ or Zsh"
+arch=('any')
+url="https://github.com/hkbakke/bash-insulter"
+license=('MIT')
+install="bash-zsh-insulter.install"
+source=("$_filename::https://raw.githubusercontent.com/hkbakke/bash-insulter/master/src/bash.command-not-found")
+md5sums=("757b466982999fe563256ed0e3d6e6bb")
+
+package() {
+ install -Dm0644 $_filename "$pkgdir/etc/$_filename"
+}
diff --git a/bash-zsh-insulter.install b/bash-zsh-insulter.install
new file mode 100644
index 000000000000..833702ae5952
--- /dev/null
+++ b/bash-zsh-insulter.install
@@ -0,0 +1,25 @@
+post_install() {
+ cat << EOF
+
+Source the file automatically for new logins by adding the following to /etc/bash.bashrc (~/.zshrc for zsh) or any of the other locations where you can configure your shell automatically during login
+
+if [ -f /etc/bash.command-not-found ]; then
+ . /etc/bash.command-not-found
+fi
+
+Start again the shell and type some invalid commands for the effects to be visible.
+
+EOF
+}
+
+post_remove() {
+ cat << EOF
+
+Remove the following from /etc/bash.bashrc (~/.zshrc for zsh) or any of the other locations where you can configure your shell automatically during login
+
+if [ -f /etc/bash.command-not-found ]; then
+ . /etc/bash.command-not-found
+fi
+
+EOF
+}