diff options
| Commit | 375d11b33142e971a82f28ddb4cc7d386e3551cf (patch) | |
|---|---|---|
| Author | 2026-11-01 17:50:07 +0200 | |
| Committer | 2026-11-01 17:50:07 +0200 | |
| Files | 85373ae415fcff7142ee1194594e8bb1e381176b /install.sh | |
| .files-375d11b33142e971a82f28ddb4cc7d386e3551cf.tar .files-375d11b33142e971a82f28ddb4cc7d386e3551cf.tar.gz .files-375d11b33142e971a82f28ddb4cc7d386e3551cf.zip | ||
| Parent | e41b78ee956a6adcfc07b3c453f70198214ca599 (diff) | |
feat!: Rework how .files are managed
1 files changed, 0 insertions, 34 deletions
| -rwxr-xr-x | install.sh | 34 |
diff --git a/install.sh b/install.sh deleted file mode 100755 index 000f9d1..0000000 --- a/install.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash - -copy="" -while [ -n "$1" ] -do - case "$1" in - (cp | copy) copy="yes" ;; - esac - shift -done - -while read -r conf -do - [ -z "$conf" ] && continue - [ ! -f "$conf" ] && echo "warning: $conf is not a regular file, skipping!" && continue - - dest="$HOME/${conf##\./}" - if [ -f "$dest" ] && ! cmp --silent -- "$dest" "$conf" - then - diff "$dest" "$conf" - printf "Files $dest and $conf are not the same! Overwrite? [y/N] " - read -n1 overwrite </dev/tty - echo - [ "$overwrite" != 'y' -a "$overwrite" != 'Y' ] && continue - fi - - dir="$(dirname "$dest")" - [ ! -d "$dir" ] && mkdir -p "$dir" || rm "$dest" >/dev/null 2>&1 - - [ -n "$copy" ] && cp "$PWD/$conf" "$dest" || ln -s "$PWD/$conf" "$dest" - echo "Installed ${conf##\./}" -done <<EOF -$(find . -type f -not -path './.git/*' -not -name 'README.md' -not -name 'install.sh') -EOF |
