diff options
author | Soispha <soispha@vhack.eu> | 2024-02-20 17:21:42 +0100 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2024-02-20 17:21:42 +0100 |
commit | f2bdeaed0bcf97a880fe36cfc8a050d1643120b8 (patch) | |
tree | ba4fe9c3ddf076529701c0e776ffef2104ac23d5 /sys/nixpkgs/pkgs/update_vim_plugins/check-duplicates.sh | |
parent | refactor(treewide): Add a `.sh` extension to shell scripts (diff) | |
download | nixos-config-f2bdeaed0bcf97a880fe36cfc8a050d1643120b8.zip |
refactor(treewide): Reformat all files with treefmt
This includes getting all shellscripts to pass shellcheck. To accomplish this, some old scripts were removed
Diffstat (limited to 'sys/nixpkgs/pkgs/update_vim_plugins/check-duplicates.sh')
-rwxr-xr-x | sys/nixpkgs/pkgs/update_vim_plugins/check-duplicates.sh | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/sys/nixpkgs/pkgs/update_vim_plugins/check-duplicates.sh b/sys/nixpkgs/pkgs/update_vim_plugins/check-duplicates.sh index dcf8b46f..781b8aeb 100755 --- a/sys/nixpkgs/pkgs/update_vim_plugins/check-duplicates.sh +++ b/sys/nixpkgs/pkgs/update_vim_plugins/check-duplicates.sh @@ -5,12 +5,10 @@ count=$(echo "$plugins" | uniq -d | wc -l) echo "duplicates count: $count" -if [ "$count" -gt 0 ] -then +if [ "$count" -gt 0 ]; then filtered_plugins=$(echo "$plugins" | uniq -d) - if [ "$1" == "check-only" ] - then + if [ "$1" == "check-only" ]; then echo "$filtered_plugins" exit 1 else @@ -21,22 +19,18 @@ then # 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 not add " " here. It would break the plugin - do + 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 + for k in $known_issues; do + if [[ $f == "$k" ]]; then found=true break fi done # test if matching issue was found - if ! $found - then + 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 |