summaryrefslogtreecommitdiff
path: root/dots.sh
blob: 38b4923c8ec81a01d077230db99042dab30bd756 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh

# usage: ./dots.sh [update|clean]?

OP="${1:-'update'}"

STOW_OP="--no-folding"
if [ "$OP" = "clean" ]; then STOW_OP="-D"; fi

find . -type d -mindepth 1 -maxdepth 1 -not -path '*/.*' \
	| sed "s/^\.\///" \
	| while read dir; do stow "$STOW_OP" "$dir"; done