diff options
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 |