From 4f5fb6b16fb0dc03ed2aae56658cc0fa0265a7ff Mon Sep 17 00:00:00 2001 From: zachir Date: Tue, 15 Jul 2025 20:49:34 -0500 Subject: Add copyright notices for scripts --- vimv | 1 + 1 file changed, 1 insertion(+) (limited to 'vimv') diff --git a/vimv b/vimv index 3b3a7bb..db89f7a 100755 --- a/vimv +++ b/vimv @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# Copyright Thameera Senanayaka on GitHub, MIT (see LICENSE-vimv) set -eu # Lists the current directory's files in Vim, so you can edit it and save to rename them -- cgit v1.2.3 From 6a085b3865a575fa669ebd1a957e268e29ff57a2 Mon Sep 17 00:00:00 2001 From: zachir Date: Tue, 15 Jul 2025 20:58:23 -0500 Subject: Use vimv as an AUR package, not here --- LICENSE-vimv | 18 ------------------ vimv | 46 ---------------------------------------------- 2 files changed, 64 deletions(-) delete mode 100644 LICENSE-vimv delete mode 100755 vimv (limited to 'vimv') diff --git a/LICENSE-vimv b/LICENSE-vimv deleted file mode 100644 index 169b39d..0000000 --- a/LICENSE-vimv +++ /dev/null @@ -1,18 +0,0 @@ -Copyright 2017 Thameera Senanayaka - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vimv b/vimv deleted file mode 100755 index db89f7a..0000000 --- a/vimv +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env bash -# Copyright Thameera Senanayaka on GitHub, MIT (see LICENSE-vimv) -set -eu - -# Lists the current directory's files in Vim, so you can edit it and save to rename them -# USAGE: vimv [file1 file2] -# https://github.com/thameera/vimv - -declare -r FILENAMES_FILE=$(mktemp "${TMPDIR:-/tmp}/vimv.XXXXXX") - -trap '{ rm -f "${FILENAMES_FILE}" ; }' EXIT - -if [ $# -ne 0 ]; then - src=( "$@" ) -else - IFS=$'\r\n' GLOBIGNORE='*' command eval 'src=($(ls))' -fi - -for ((i=0;i<${#src[@]};++i)); do - echo "${src[i]}" >> "${FILENAMES_FILE}" -done - -${EDITOR:-vi} "${FILENAMES_FILE}" - -IFS=$'\r\n' GLOBIGNORE='*' command eval 'dest=($(cat "${FILENAMES_FILE}"))' - -if (( ${#src[@]} != ${#dest[@]} )); then - echo "WARN: Number of files changed. Did you delete a line by accident? Aborting.." >&2 - exit 1 -fi - -declare -i count=0 -for ((i=0;i<${#src[@]};++i)); do - if [ "${src[i]}" != "${dest[i]}" ]; then - mkdir -p "$(dirname "${dest[i]}")" - if git ls-files --error-unmatch "${src[i]}" > /dev/null 2>&1; then - git mv "${src[i]}" "${dest[i]}" - else - mv "${src[i]}" "${dest[i]}" - fi - ((++count)) - fi -done - -echo "$count" files renamed. - -- cgit v1.2.3