Permalink
Browse files

shell voodo: assorted updates

  • Loading branch information...
1 parent ecd64dd commit 1f6adb6728d382ca237c29d8f242a516df743ca0 @falconindy committed Mar 16, 2014
Showing with 27 additions and 7 deletions.
  1. +0 −1 .aliases
  2. +3 −0 .bashrc
  3. +22 −4 .functions
  4. +2 −2 .profile
View
@@ -3,7 +3,6 @@
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
-alias abuild='sudo sh -c "extra-x86_64-build && extra-i686-build"'
alias callgrind='valgrind --tool=callgrind'
alias clearflags='unset CFLAGS CPPFLAGS LDFLAGS'
alias cdg='up .git'
View
@@ -35,6 +35,8 @@ export HISTCONTROL="ignoreboth:erasedups"
export HISTSIZE=1000
export HISTFILESIZE=2000
+GIT_EXEC_PATH=/usr/lib/git:/usr/share/git/remote-helpers
+
source_bash_completion() {
local f
[[ $BASH_COMPLETION ]] && return 0
@@ -67,3 +69,4 @@ if type -p keychain >/dev/null && (( UID != 0 )); then
eval $(keychain --eval "${keys[@]#$HOME/.ssh/}")
unset keys
fi
+
View
@@ -1,5 +1,10 @@
#!/bin/bash
+abuild() {
+ local repo=${1:-extra}
+ sudo sh -c "'$repo-x86_64-build' && '$repo-i686-build'"
+}
+
calc() {
echo "scale=3; $*" | bc
}
@@ -25,9 +30,6 @@ confpac() {
--enable-warningflags \
--enable-debug \
"$@"
- for path in lib/libalpm src/{pacman,util}; do
- ln -sf ../../config.h $path/config.h
- done
}
pushd() {
@@ -83,7 +85,7 @@ deps() {
:
else
# maybe its a lib?
- [[ -f /usr/lib/$1 ]] && bin=$dir/$1
+ [[ -f /usr/lib/$1 ]] && bin=/usr/lib/$1
fi
if [[ $bin && $1 != "$bin" ]]; then
@@ -255,6 +257,10 @@ rlatest() {
}
}
+signall() {
+ for _; do gpg --detach-sign "$_"; done
+}
+
sdstat() {
systemctl status "$@"
}
@@ -267,6 +273,18 @@ t() {
tmux -L main "${@:-attach}"
}
+traffic() {
+ ss -t '( not dst localhost )' | awk '
+ NR > 1 {
+ sub(/:[^:]+$/, "", $NF)
+ a[$NF]++
+ }
+ END {
+ for (h in a)
+ printf "%s\t%d\n", h, a[h]
+ }'
+}
+
up() {
local cdinto=0 x= traverse= curpath=
View
@@ -8,5 +8,5 @@ export PAGER=less
PATH=$HOME/bin:$PATH
export CDPATH=.:/mnt/Gluttony:/mnt/Haven
-[ -f ~/.profile."$HOSTNAME" ] && . ~/.profile."$HOSTNAME"
-[ -n $BASH -a -r ~/.bashrc ] && . ~/.bashrc
+[ -f "$HOME/.profile.$HOSTNAME" ] && . ~/.profile."$HOSTNAME"
+[ -n "$BASH" ] && [ -r "$HOME/.bashrc" ] && . ~/.bashrc

0 comments on commit 1f6adb6

Please sign in to comment.