5 mkdir() { echo -- "$*"; }
8 alias cap_mkdb="echo cap_mkdb"
9 alias unlink="echo unlink"
12 # create preferred folder structure
14 mkdir -p bin etc share .urxvt/ext > /dev/null 2>&1
15 mkdir -m 700 var/tmp var/tmp/vim > /dev/null 2>&1
18 # accomodate multiple userlands
21 # TODO: make links safer for systems without -Fw
22 freebsd) lnargs=-sFhvw;;
23 netbsd|openbsd) lnargs=-sfhv;;
25 # android busybox find doesn't have -executable
26 # and its sh doesn't set OSTYPE :DD
27 if [ -z "$ANDROID_ROOT" ]; then
34 [ -L "$1" -o \! -e "$1" ] && ln $lnargs "${2:-$x}" "$1"
38 find "$PWD/base" -mindepth 1 -maxdepth 1 | while read -r x; do
39 l "$HOME/`basename "$x"`"
41 find bin share -mindepth 1 -maxdepth 1 | while read -r x; do
42 l "$HOME/$x" "$PWD/$x"
44 find "$PWD/xdg" -mindepth 1 -maxdepth 1 | while read -r x; do
45 l "${XDG_CONFIG_HOME:-$HOME/etc}/`basename "$x"`"
47 find "$PWD/urxvt-ext" -type f $fex -mindepth 1 -maxdepth 2 | while read -r x; do
48 l "$HOME/.urxvt/ext/`basename $x`"
52 if [ "$OSTYPE" = "freebsd" ]; then
55 # FreeBSD tries `_secure_path' on `.login_conf' before reading the
56 # database, so it needs to be compiled and unlinked for it to actually
63 # run .zprofile to set up tmp