add more functions from my ~/.profile
authorThorsten Glaser <tg@mirbsd.org>
Thu, 23 May 2013 20:13:52 +0000 (20:13 +0000)
committerThorsten Glaser <tg@mirbsd.org>
Thu, 23 May 2013 20:13:52 +0000 (20:13 +0000)
bash-ksh/profile-funcs [new file with mode: 0644]
posix/profile-funcs

diff --git a/bash-ksh/profile-funcs b/bash-ksh/profile-funcs
new file mode 100644 (file)
index 0000000..bda9632
--- /dev/null
@@ -0,0 +1,26 @@
+# Debian Bug Tracking System
+bts() {
+       if [[ $1 = +([0-9]) ]]; then
+               ${BROWSER:-lynx} "http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=$1"
+       else
+               ${BROWSER:-lynx} "http://bugs.debian.org/$*"
+       fi
+}
+# Debian Package Tracking System, QA, buildd logs Debian, buildd logs D-Ports
+pts() {
+       local p=${1%%_*} not_slash_bksls=$'[!/\t\n\f\r ]'
+
+       if [[ $p = src:* ]]; then
+               ${BROWSER:-lynx} "http://packages.debian.org/source/sid/${p#src:}"
+       elif [[ $p = qa:lib${not_slash_bksls}${not_slash_bksls}* ]]; then
+               ${BROWSER:-lynx} "http://packages.qa.debian.org/${p:3:4}/${p#qa:}.html"
+       elif [[ $p = qa:* ]]; then
+               ${BROWSER:-lynx} "http://packages.qa.debian.org/${p:3:1}/${p#qa:}.html"
+       elif [[ $p = bd:* ]]; then
+               ${BROWSER:-lynx} "https://buildd.debian.org/status/package.php?p=${p#bd:}"
+       elif [[ $p = bp:* ]]; then
+               ${BROWSER:-lynx} "http://buildd.debian-ports.org/status/package.php?p=${p#bp:}"
+       else
+               ${BROWSER:-lynx} "http://packages.debian.org/sid/$p"
+       fi
+}
index ae13f7b..618db72 100644 (file)
@@ -190,3 +190,9 @@ setenv() {
        eval $1=\$2
        eval export $1
 }
+
+# benchmark machine with python
+pystones() {
+       # default for $1 is 50000
+       ${2:-python} -c "from test import pystone; pystone.main($1)"
+}