Summary Files Commits Branches @commit @diff @stats
path: root / copy.sh
diff options
context:
space:
mode:
Commit1ad731f7f197e9a11891e2903e19b90fcbbc9de1 (patch)
Author
 Syndamia <kamen@syndamia.com>
2025-03-28 19:15:27 +0200
Committer
 Syndamia <kamen@syndamia.com>
2025-03-28 19:15:27 +0200
Fileseca63511b34fbe2793350c0c35a2a32bebb5fe61 /copy.sh
.files-1ad731f7f197e9a11891e2903e19b90fcbbc9de1.tar
.files-1ad731f7f197e9a11891e2903e19b90fcbbc9de1.tar.gz
.files-1ad731f7f197e9a11891e2903e19b90fcbbc9de1.zip
Parentbb35aad51d0338bc919adb1ccd3e5effcb3c4499 (diff)
feat(install.sh): Move copy.sh logic to install.sh
1 files changed, 0 insertions, 24 deletions
-rwxr-xr-xcopy.sh24
diff --git a/copy.sh b/copy.sh
deleted file mode 100755
index c07f01f..0000000
--- a/copy.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env bash
-
-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' && "$overwrite" != 'Y' ] && continue
- fi
-
- dir="$(dirname "$dest")"
- [ ! -d "$dir" ] && mkdir -p "$dir" || rm "$dest" >/dev/null 2>&1
- cp "$PWD/$conf" "$dest"
- echo "Installed ${conf##\./}"
-done <<EOF
-$(find . -type f -not -path './.git/*' -not -name 'README.md' -not -name 'install.sh' -not -name 'copy.sh')
-EOF