Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 3 files changed
  • 0 comments
  • 1 contributor

Showing 3 changed files with 22 additions and 11 deletions. Show diff stats Hide diff stats

  1. +0 1  .aliases
  2. +20 9 .functions
  3. +2 1  .profile
1  .aliases
@@ -22,7 +22,6 @@ alias randbg='feh --bg-scale $(randomWallpaper)'
22 22 alias rename='/usr/lib/perl5/vendor_perl/bin/rename'
23 23 alias space='LD_PRELOAD=$HOME/lib/libspace.so'
24 24 alias sudo='sudo '
25   -alias svnrm='svn up --set-depth exclude'
26 25 alias udevinfo='udevadm info -q all -n'
27 26 alias v='vim'
28 27 alias vgfull='valgrind --leak-check=full --show-reachable=yes'
29 .functions
@@ -17,7 +17,7 @@ cg2dot() {
17 17 confpac() {
18 18 [[ -f autogen.sh ]] || return 1
19 19 ./autogen.sh
20   - dconfigure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-git-version --enable-debug "$@"
  20 + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-git-version --enable-debug "$@"
21 21 for path in lib/libalpm src/{pacman,util}; do
22 22 ln -sf ../../config.h $path/config.h
23 23 done
@@ -27,11 +27,11 @@ pushd() {
27 27 builtin pushd "${@:-$HOME}"
28 28 }
29 29
30   -dconfigure() {
  30 +./configure() {
31 31 if [[ -x /bin/dash ]]; then
32 32 CONFIG_SHELL=/bin/dash /bin/dash ./configure CONFIG_SHELL=/bin/dash "$@"
33 33 else
34   - ./configure "$@"
  34 + command ./configure "$@"
35 35 fi
36 36 }
37 37
@@ -73,18 +73,17 @@ deps() {
73 73 if [[ -f "$1" ]]; then
74 74 prog=$1
75 75 else
76   - prog=$(type -P $1)
77   - echo -e "$1 => $prog\n"
  76 + prog=$(type -P $1) && echo -e "$1 => $prog\n"
78 77 fi
79 78
80   - [[ -z $prog ]] && { echo "File not found"; return 1; }
81   - readelf -d $prog | sed -n '/NEEDED/s/.* library: \[\(.*\)\]/\1/p'
  79 + [[ -z $prog ]] && { echo "error: binary not found: $1"; return 1; }
  80 + objdump -p "$prog" | awk '/NEEDED/ { print $2 }'
82 81 }
83 82
84 83 depscan() {
85 84 [[ -z $1 ]] && { echo "usage: depscan <package>"; return; }
86 85 while read elfobj; do
87   - readelf -d $elfobj | sed -n 's|.*NEEDED.*\[\(.*\)\].*|'$elfobj' -- \1|p'
  86 + objdump -p "$elfobj" | awk '/NEEDED/ { print $2 }'
88 87 done < <(file $(pacman -Qlq $1) | sed -n '/ELF/s/^\(.*\):.*/\1/p') | nl
89 88 }
90 89
@@ -181,6 +180,14 @@ hex2dec() {
181 180 printf "%d\n" 0x$1
182 181 }
183 182
  183 +hex2ip() {
  184 + printf '%d.%d.%d.%d\n' \
  185 + $(( 0x${1:6:2} )) \
  186 + $(( 0x${1:4:2} )) \
  187 + $(( 0x${1:2:2} )) \
  188 + $(( 0x${1:0:2} ))
  189 +}
  190 +
184 191 kc() {
185 192 eval $(keychain --eval id_rsa)
186 193 }
@@ -260,7 +267,7 @@ rlatest() {
260 267 }
261 268
262 269 sprunge() {
263   - curl -sF 'sprunge=<-' 'http://sprunge.us' < "${1:-/dev/stdin}"
  270 + curl -sF "sprunge=<${1:--}" 'http://sprunge.us'
264 271 }
265 272
266 273 sdstat() {
@@ -274,6 +281,10 @@ sdstat() {
274 281 systemctl status "${services[@]}"
275 282 }
276 283
  284 +svnrm() {
  285 + svn up --set-depth exclude "$@" && rm -rf "$@"
  286 +}
  287 +
277 288 t() {
278 289 tmux -L main "${@:-attach}"
279 290 }
3  .profile
@@ -10,11 +10,12 @@ export GOROOT=$HOME/go
10 10 export GOBIN=$GOROOT/bin
11 11
12 12 # locale
  13 +export LANG=en_US.UTF-8
13 14 export LC_COLLATE=C
14 15 export LC_NUMERIC=C
15 16
16 17 # path
17   -export PATH=$GOBIN:$HOME/bin:$PATH
  18 +PATH=$GOBIN:$HOME/bin:$PATH
18 19 export CDPATH=.:/mnt/Gluttony:/mnt/Haven
19 20
20 21 [ -n $BASH -a -r ~/.bashrc ] && . ~/.bashrc

No commit comments for this range

Something went wrong with that request. Please try again.