[pacman-dev] [PATCH] repo-add: add new command, repo-elephant

Dave Reisner d at falconindy.com
Fri Jun 24 15:21:55 EDT 2011


   _    _
  / \__/ \_____
 /  /  \  \    `\
 )  \''/  (     |\
 `\__)/__/'_\  / `
    //_|_|~|_|_|
    ^""'"' ""'"'

Signed-off-by: Dave Reisner <d at falconindy.com>
---
An elephant never forgets... or forgives...

 scripts/Makefile.am    |    7 ++++++-
 scripts/repo-add.sh.in |   26 ++++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 1 deletions(-)

diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 3b96c11..492eb0f 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -5,7 +5,8 @@ SUBDIRS = po
 
 bin_SCRIPTS = \
 	$(OURSCRIPTS) \
-	repo-remove
+	repo-remove \
+	repo-elephant
 
 OURSCRIPTS = \
 	makepkg \
@@ -97,4 +98,8 @@ repo-remove: $(srcdir)/repo-add.sh.in
 	rm -f repo-remove
 	$(LN_S) repo-add repo-remove
 
+repo-elephant: $(srcdir)/repo-add.sh.in
+	rm -f repo-elephant
+	$(LN_S) repo-add repo-elephant
+
 # vim:set ts=2 sw=2 noet:
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in
index 9fdc750..0ccefc2 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -391,6 +391,27 @@ db_remove_entry() {
 	return $notfound
 } # end db_remove_entry
 
+elephant() {
+	cat <<EOF
+     __
+    '. \
+     '- \
+      / /_         .---.
+     / | \\,.\/--.//    )
+     |  \//        )/  /
+      \  ' ^ ^    /    )____.----..  6
+       '.____.    .___/            \._)
+          .\/.                      )
+           '\                       /
+           _/ \/    ).        )    (
+          /#  .!    |        /\    /
+          \  C// #  /'-----''/ #  /
+       .   'C/ |    |    |   |    |mrf  ,
+       \), .. .'OOO-'. ..'OOO'OOO-'. ..\(,
+EOF
+	exit 0
+}
+
 check_repo_db() {
 	local repodir
 
@@ -533,6 +554,11 @@ esac
 
 # figure out what program we are
 cmd=${0##*/}
+if [[ $cmd == "repo-elephant" ]]; then
+	elephant
+	exit 0
+fi
+
 if [[ $cmd != "repo-add" && $cmd != "repo-remove" ]]; then
 	error "$(gettext "Invalid command name '%s' specified.")" "$cmd"
 	exit 1
-- 
1.7.5.4



More information about the pacman-dev mailing list