dots/clean.sh
2025-11-16 22:32:14 +01:00

19 lines
343 B
Bash
Executable file

#!/bin/sh
set -e
set -x
if ! which lr >/dev/null 2>&1; then
>&2 echo "install leah2'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