Skip to content

Commit

Permalink
Merge pull request #3 from carapace-sh/fix-script
Browse files Browse the repository at this point in the history
fix script
  • Loading branch information
rsteube authored Sep 17, 2024
2 parents b475f77 + f2e1b95 commit 611f68f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/og-image.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
for arg in "$@"; do
link=$(grep --only-matching --extended-regexp --max-count 1 '"[^"]+/banner.png' "$arg")
[ "$link" != "" ] && sed -i "/<head>/a \ <meta property=\"og:image\" content=\"${link}\" />" "$arg"
link=$(grep --only-matching --extended-regexp --max-count 1 '"[^"]+/banner.png"' "$arg")
[ "$link" != "" ] && sed -i "/<head>/a \ <meta property=\"og:image\" content=${link} />" "$arg"
done
exit 0

0 comments on commit 611f68f

Please sign in to comment.