7 alias cap_mkdb="echo cap_mkdb"
8 alias unlink="echo unlink"
11 #create preferred folder structure
13 mkdir -p bin etc share .urxvt/ext > /dev/null 2>&1
14 mkdir -m 700 tmp tmp/vim > /dev/null 2>&1
20 # TODO: make links safer for systems without -Fw
21 freebsd) lnargs=-sFhvw;;
22 netbsd|openbsd) lnargs=-sfhv;;
24 #android busybox find doesn't have -executable
25 #and its sh doesn't set OSTYPE :DD
26 if [ -z "$ANDROID_ROOT" ]; then
33 [ -L "$1" -o \! -e "$1" ] && ln $lnargs "${2:-$x}" "$1"
36 find "$PWD/base" -mindepth 1 -maxdepth 1 | while read -r x; do
37 l "$HOME/`basename "$x"`"
39 find bin share -mindepth 1 -maxdepth 1 | while read -r x; do
40 l "$HOME/$x" "$PWD/$x"
42 find "$PWD/xdg" -mindepth 1 -maxdepth 1 | while read -r x; do
43 l "${XDG_CONFIG_HOME:-$HOME/etc}/`basename "$x"`"
45 find "$PWD/urxvt-ext" -type f $fex -mindepth 1 -maxdepth 2 | while read -r x; do
46 l "$HOME/.urxvt/ext/`basename $x`"
50 if [ "$OSTYPE" = "freebsd" ]; then
53 #FreeBSD tries `_secure_path' on `.login_conf' before reading the database,
54 #so it needs to be compiled and unlinked for it to actually take effect.