3 #NOTE: .zshenv XDG paths are hardcoded to allow non-zsh install
6 if [ "$1" = "test" ]; then
7 mkdir() { echo -- "$@"; }
10 alias cap_mkdb="echo cap_mkdb"
11 alias unlink="echo unlink"
14 # create preferred folder structure
16 mkdir -p bin etc share share/fonts .urxvt/ext .icons .themes > /dev/null 2>&1
17 mkdir -pm 700 var/tmp var/tmp/vim > /dev/null 2>&1
21 if [ -z "$OSTYPE" ]; then
22 OSTYPE=`uname -s | tr '[:upper:]' '[:lower:]'`
25 # accomodate multiple userlands
28 # TODO: make links safer for systems without -Fw
29 freebsd*) lnargs=-sFhvw;;
30 netbsd|openbsd*) lnargs=-sfhv;;
35 [ -L "$1" -o \! -e "$1" ] && ln $lnargs "${2:-$x}" "$1"
39 find "$PWD/base" -mindepth 1 -maxdepth 1 | while read -r x; do
40 l "$HOME/`basename "$x"`"
42 find bin share -mindepth 1 -maxdepth 1 | while read -r x; do
43 l "$HOME/$x" "$PWD/$x"
45 find "$PWD/xdg" -mindepth 1 -maxdepth 1 | while read -r x; do
46 l "$HOME/etc/`basename "$x"`"
48 find "$PWD/urxvt-ext" -type f -perm -111 -mindepth 1 -maxdepth 2 | while read -r x; do
49 l "$HOME/.urxvt/ext/`basename $x`"
51 find "$PWD/xorg/icons" -type d -mindepth 1 -maxdepth 2 | while read -r x; do
52 if [ -e "$x/index.theme" ]; then
53 l "$HOME/.icons/`basename "$x"`"
56 find "$PWD/xorg/themes" -type d -mindepth 1 -maxdepth 1 | while read -r x; do
57 l "$HOME/.themes/`basename "$x"`"
59 find "$PWD/xorg/fonts" -type d -mindepth 1 -maxdepth 1 | while read -r x; do
60 l "$HOME/share/fonts/`basename "$x"`"
63 # run .zprofile to set up tmp