dots/clean.sh
2026-04-02 17:23:50 +02:00

19 lines
352 B
Bash
Executable file

#!/bin/sh
set -e
set -x
if ! which lr >/dev/null 2>&1; then
>&2 echo "install leahneukirchen's lr(1) first"
exit 1
fi
if test ! -d './files'; then
>&2 echo "This script has to be executed from the dotfiles root"
exit 1
fi
cd files
files="$(lr -U -t 'path!~".git" && path~~".*" && type=f' |
xargs printf '%s/%s\n' "$HOME")"
rm -f $files