]>
Commit | Line | Data |
---|---|---|
189288f7 | 1 | #!/bin/sh |
d9362f34 | 2 | |
f29cd560 | 3 | #fix permissions from git (TODO: should probably move this to git hook) |
d9362f34 | 4 | chmod go= base/.zshenv base/.Xresources |
5 | ||
9938f1e2 | 6 | if [ 0 -eq 1 ]; then |
7 | alias mkdir="echo mkdir" | |
8 | alias ln="echo ln" | |
9 | alias rm="echo rm" | |
10 | alias cap_mkdb="echo cap_mkdb" | |
11 | alias unlink="echo unlink" | |
12 | fi | |
13 | ||
14 | l() { | |
f29cd560 | 15 | # TODO: use install? |
9938f1e2 | 16 | [ -L "$1" -o \! -e "$1" ] && ln -sFhvw "$x" "$1" |
17 | } | |
18 | ||
19 | find "$PWD/base" -depth 1 | while read -r x; do | |
20 | l "$HOME/`basename "$x"`" | |
21 | done | |
f29cd560 | 22 | mkdir "$HOME/bin" |
23 | find "$PWD/bin" -depth 1 | while read -r x; do | |
24 | l "$HOME/bin/`basename "$x"`" | |
25 | done | |
9938f1e2 | 26 | find "$PWD/xdg" -depth 1 | while read -r x; do |
27 | l "${XDG_CONFIG_HOME:-$HOME/.config}/`basename "$x"`" | |
7f0acd88 | 28 | done |
9938f1e2 | 29 | mkdir -p "$HOME/.urxvt/ext" |
30 | find "$PWD/urxvt-ext" -type f -perm -ugo=x -mindepth 1 -maxdepth 2 | while read -r x; do | |
31 | l "$HOME/.urxvt/ext/`basename $x`" | |
805ce2dc | 32 | done |
bd6360b9 | 33 | touch "$HOME/.hushlogin" |
7f0acd88 | 34 | |
39bd5e00 | 35 | #FreeBSD tries `_secure_path' on `.login_conf' before reaading the database, |
36 | #so it needs to be compiled and unlinked for it to actually take effect. | |
d9362f34 | 37 | cd "$HOME" |
39bd5e00 | 38 | rm .login_conf.db |
39 | cap_mkdb .login_conf | |
40 | unlink .login_conf | |
d9362f34 | 41 | cd - |