Skip to content

Commit

Permalink
Updated new-plugins scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
a1994sc committed May 23, 2024
1 parent 018a782 commit 8cdea4c
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions new-plugins.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,28 @@
#!/bin/sh
rm -rf target
mkdir -p target
git clone https://github.com/kubernetes-sigs/krew-index.git target/

quiet_git() {
stdout=$(mktemp)
stderr=$(mktemp)

if ! git "$@" </dev/null >$stdout 2>$stderr; then
cat $stderr >&2
rm -f $stdout $stderr
exit 1
fi

rm -f $stdout $stderr
}

quiet_git clone https://github.com/kubernetes-sigs/krew-index.git target/

for filename in target/plugins/*; do
plugin=$(basename ${filename%.*})
mkdir -p plugins/$plugin

if ! test -f plugins/$plugin/default.json; then
cp template/default.json plugins/$plugin
ruby update.rb $plugin
fi
done

ruby update.rb

0 comments on commit 8cdea4c

Please sign in to comment.