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 if [ -z "$OSTYPE" ]; then
22 OSTYPE=`uname -o | tr '[:upper:]' '[:lower:]'`
25 # TODO: make links safer for systems without -Fw
26 freebsd*) lnargs=-sFhvw;;
27 netbsd*|openbsd*) lnargs=-sfhv;;
28 # android busybox find doesn't have -executable
29 android) fex=-executable;;
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