about summary refs log tree commit diff stats
path: root/pkgs/sources/update_vim_plugins/check-duplicates.sh
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-05-23 13:26:22 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-05-23 13:26:22 +0200
commit204731c0a69136c9cebcb54f1afecf5145e26bbe (patch)
treefc9132e5dc74e4a8e1327cdd411839a90f9410aa /pkgs/sources/update_vim_plugins/check-duplicates.sh
parentrefactor(sys): Modularize and move to `modules/system` or `pkgs` (diff)
downloadnixos-config-204731c0a69136c9cebcb54f1afecf5145e26bbe.tar.gz
nixos-config-204731c0a69136c9cebcb54f1afecf5145e26bbe.zip
refactor(pkgs): Categorize into `by-name` shards
This might not be the perfect way to organize a package set --
especially if the set is not nearly the size of nixpkgs -- but it is
_at_ least a way of organization.
Diffstat (limited to 'pkgs/sources/update_vim_plugins/check-duplicates.sh')
-rwxr-xr-xpkgs/sources/update_vim_plugins/check-duplicates.sh43
1 files changed, 0 insertions, 43 deletions
diff --git a/pkgs/sources/update_vim_plugins/check-duplicates.sh b/pkgs/sources/update_vim_plugins/check-duplicates.sh
deleted file mode 100755
index 781b8aeb..00000000
--- a/pkgs/sources/update_vim_plugins/check-duplicates.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/usr/bin/env bash
-
-plugins="$(grep -E "^  [a-zA-Z-]+ =" ./pkgs/vim-plugins.nix | sed -E 's/^  ([a-zA-Z-]+) =.*$/\1/' | sort)"
-count=$(echo "$plugins" | uniq -d | wc -l)
-
-echo "duplicates count: $count"
-
-if [ "$count" -gt 0 ]; then
-    filtered_plugins=$(echo "$plugins" | uniq -d)
-
-    if [ "$1" == "check-only" ]; then
-        echo "$filtered_plugins"
-        exit 1
-    else
-        known_issues=$(gh issue list --state "open" --label "bot" --json "body" | jq -r ".[].body")
-
-        echo "known_issues: $known_issues"
-
-        # iterate over plugins we found missing and
-        # compare them to all open issues.
-        # We no matching issue was found, we create a new one
-        for f in $filtered_plugins; do # do not add " " here. It would break the plugin
-            found=false
-
-            for k in $known_issues; do
-                if [[ $f == "$k" ]]; then
-                    found=true
-                    break
-                fi
-            done
-
-            # test if matching issue was found
-            if ! $found; then
-                echo "Did not find an issue for $f. Creating a new one ..."
-                gh issue create --title "Detected broken plugin: $f" --label "bot" --body "$f"
-            else
-                echo "Issue for $f already exists"
-            fi
-        done
-    fi
-else
-    echo "No duplicates found"
-fi