diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-03-29 16:40:54 +1100 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-03-29 16:40:54 +1100 |
| commit | 0bfcbbf0dc83f87ab21d7d3b4a5980eaa51f0018 (patch) | |
| tree | ea3052513cdfcbe01a62812d13fdfc25c79c01c8 /install/util.fish | |
| parent | scheme: fix fruitsalad colours (diff) | |
| download | caelestia-cli-0bfcbbf0dc83f87ab21d7d3b4a5980eaa51f0018.tar.gz caelestia-cli-0bfcbbf0dc83f87ab21d7d3b4a5980eaa51f0018.tar.bz2 caelestia-cli-0bfcbbf0dc83f87ab21d7d3b4a5980eaa51f0018.zip | |
install: add qt
Diffstat (limited to 'install/util.fish')
| -rw-r--r-- | install/util.fish | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/install/util.fish b/install/util.fish index 1d1a6ec..e5dd7f8 100644 --- a/install/util.fish +++ b/install/util.fish @@ -116,3 +116,13 @@ function install-link -a from to ln -s $from $to end end + +function confirm-copy -a from to + test -L $to -a "$(realpath $to 2> /dev/null)" = (realpath $from) && return # Return if symlink + cmp $from $to &> /dev/null && return # Return if files are the same + if test -e $to + read -l -p "input '$(realpath $to) already exists. Overwrite? [y/N] ' -n" confirm + test "$confirm" = 'y' -o "$confirm" = 'Y' && log 'Continuing.' || return + end + cp $from $to +end |