]> git.sev.monster Git - dotfiles.git/blame - install.sh
remove tint2 battery alert, zsh dotfiles vcs check
[dotfiles.git] / install.sh
CommitLineData
1b8a4102 1#!/bin/sh
03bc64c4 2
7f359c8a 3if [ 0 -eq 1 ]; then
4 alias mkdir="echo mkdir"
5 alias ln="echo ln"
6 alias rm="echo rm"
7 alias cap_mkdb="echo cap_mkdb"
8 alias unlink="echo unlink"
9fi
10
1873e725 11#fix permissions from git (TODO: should probably move this to git hook)
12chmod go= base/.zshenv base/.Xresources
13
14#create preferred folder structure
15cd "$HOME"
16mkdir -p bin etc share .urxvt/ext > /dev/null 2>&1
17mkdir -m 700 tmp tmp/vim > /dev/null 2>&1
18cd -
19
7f359c8a 20l() {
1390d028 21 # TODO: use install?
a58ad2f0 22 [ -L "$1" -o \! -e "$1" ] && ln -sFhvw "${2:-$x}" "$1"
7f359c8a 23}
24
25find "$PWD/base" -depth 1 | while read -r x; do
26 l "$HOME/`basename "$x"`"
27done
a58ad2f0 28find bin share -depth 1 | while read -r x; do
29 l "$HOME/$x" "$PWD/$x"
1390d028 30done
7f359c8a 31find "$PWD/xdg" -depth 1 | while read -r x; do
32 l "${XDG_CONFIG_HOME:-$HOME/.config}/`basename "$x"`"
04ff96a4 33done
7f359c8a 34find "$PWD/urxvt-ext" -type f -perm -ugo=x -mindepth 1 -maxdepth 2 | while read -r x; do
35 l "$HOME/.urxvt/ext/`basename $x`"
82151901 36done
e969e1c2 37touch "$HOME/.hushlogin"
04ff96a4 38
ee4bf66d 39#FreeBSD tries `_secure_path' on `.login_conf' before reaading the database,
40#so it needs to be compiled and unlinked for it to actually take effect.
03bc64c4 41cd "$HOME"
ee4bf66d 42rm .login_conf.db
43cap_mkdb .login_conf
44unlink .login_conf
03bc64c4 45cd -
This page took 0.045223 seconds and 4 git commands to generate.