summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <d@falconindy.com>2011-06-24 15:19:36 -0400
committerDave Reisner <dreisner@archlinux.org>2011-06-27 14:10:03 -0400
commitdb172b09c55fd4f110717e1e5586e9ba5e29607e (patch)
tree2989349e0520cc85312ed82b180d4178742abd87
parent399184d68f23e124e386a340abf5bcec968b322b (diff)
downloadpacman-db172b09c55fd4f110717e1e5586e9ba5e29607e.tar.xz
repo-add: add new command, repo-elephant
_ _ / \__/ \_____ / / \ \ `\ ) \''/ ( |\ `\__)/__/'_\ / ` //_|_|~|_|_| ^""'"' ""'"' Signed-off-by: Dave Reisner <d@falconindy.com>
-rw-r--r--.gitignore1
-rw-r--r--scripts/Makefile.am7
-rw-r--r--scripts/repo-add.sh.in21
3 files changed, 28 insertions, 1 deletions
diff --git a/.gitignore b/.gitignore
index b2db3a07..cfe92e8d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,3 +19,4 @@ pacman-*.tar.gz
root
stamp-h1
tags
+repo-elephant
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 3b96c110..492eb0ff 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 7f5674e2..1d78c472 100644
--- a/scripts/repo-add.sh.in
+++ b/scripts/repo-add.sh.in
@@ -391,6 +391,22 @@ db_remove_entry() {
return $notfound
} # end db_remove_entry
+elephant() {
+ case $(( RANDOM % 2 )) in
+ 0) printf '%s\n' "H4sIAL3qBE4CAyWLwQ3AMAgD/0xh5UPzYiFUMgjq7LUJsk7yIQNAQTAikFUDnqkr" \
+ "OQFOUm0Wd9pHCi13ONjBpVdqcWx+EdXVX4vXvGv5cgztB9+fJxZ7AAAA"
+ ;;
+
+ 1) printf '%s\n' "H4sIAJVWBU4CA21RMQ7DIBDbeYWrDgQJ7rZ+IA/IB05l69alcx5fc0ASVXUk4jOO" \
+ "7yAAUWtorygwJ4hlMii0YkJKKRKGvsMsiykl1SalvrMD1gUXyXRkGZPx5OPft81K" \
+ "tNAiAjyGjYO47h1JjizPkJrCWbK/4C+uLkT7bzpGc7CT9bmOzNSW5WLSO5vexjmH" \
+ "ZL9JFFZeAa0a2+lKjL2anpYfV+0Zx9LJ+/MC8nRayuDlSNy2rfAPibOzsiWHL0jL" \
+ "SsjFAQAA"
+ ;;
+ esac | openssl base64 -d | gzip -d
+ exit 0
+}
+
check_repo_db() {
local repodir
@@ -533,6 +549,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