-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: the return of core dependencies
- Loading branch information
1 parent
c316f4e
commit 43143cc
Showing
6 changed files
with
154 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
<div class="install"> | ||
<span class="label">Install command: </span> | ||
<div class="copyable"> | ||
{%- highlight bash -%} brew install{{include.modifier}} {{include.item}} {%- endhighlight -%} | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
#!/bin/bash | ||
|
||
keys=( | ||
"dependencies" | ||
"build_dependencies" | ||
"test_dependencies" | ||
) | ||
|
||
for key in "${keys[@]}" | ||
do | ||
find _data/formula -name "*.json" -type f -exec sed -i "s/$key/core_$key/g" {} + | ||
find _data/formula -name "*.json" -type f -exec sed -i "s/\"$key\"/\"core_$key\"/g" {} + | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
#!/bin/bash | ||
|
||
formulae=( | ||
"autoconf" | ||
"[email protected]" | ||
"[email protected]" | ||
"automake" | ||
"[email protected]" | ||
"bison" | ||
"ca-certificates" | ||
"cairo" | ||
"certifi" | ||
"cmake" | ||
"fontconfig" | ||
"freetype" | ||
"gawk" | ||
"gdbm" | ||
"gettext" | ||
"giflib" | ||
"glib" | ||
"gmp" | ||
"gobject-introspection" | ||
"graphite2" | ||
"harfbuzz" | ||
"icu4c" | ||
"jpeg-turbo" | ||
"[email protected]" | ||
"[email protected]" | ||
"libgit2" | ||
"libpng" | ||
"libssh2" | ||
"libtermkey" | ||
"libtiff" | ||
"libtool" | ||
"libuv" | ||
"libvterm" | ||
"libx11" | ||
"libxau" | ||
"libxcb" | ||
"libxdmcp" | ||
"libxext" | ||
"libxrender" | ||
"little-cms2" | ||
"llvm@8" | ||
"llvm@9" | ||
"llvm@11" | ||
"llvm@12" | ||
"llvm@13" | ||
"llvm@14" | ||
"llvm@15" | ||
"llvm@16" | ||
"llvm" | ||
"lpeg" | ||
"lua" | ||
"[email protected]" | ||
"[email protected]" | ||
"luajit" | ||
"luarocks" | ||
"luv" | ||
"lz4" | ||
"lzo" | ||
"m4" | ||
"meson" | ||
"mpdecimal" | ||
"mpfr" | ||
"msgpack" | ||
"nasm" | ||
"neovim" | ||
"ninja" | ||
"openjdk@11" | ||
"openjdk@17" | ||
"openjdk@8" | ||
"[email protected]" | ||
"openssl@3" | ||
"[email protected]" | ||
"page" | ||
"pcre" | ||
"pcre2" | ||
"pixman" | ||
"pkg-config" | ||
"pkgconf" | ||
"python-setuptools" | ||
"[email protected]" | ||
"[email protected]" | ||
"[email protected]" | ||
"[email protected]" | ||
"[email protected]" | ||
"[email protected]" | ||
"readline" | ||
"rust" | ||
"sphinx-doc" | ||
"sqlite" | ||
"swig@3" | ||
"swig" | ||
"tcl-tk" | ||
"tree-sitter" | ||
"unibilium" | ||
"unzip" | ||
"util-macros" | ||
"xcb-proto" | ||
"xorgproto" | ||
"xtrans" | ||
"xz" | ||
"z3" | ||
"zstd" | ||
) | ||
|
||
for formula in "${formulae[@]}" | ||
do | ||
# Download and format JSON | ||
mkdir -p _data/formula-core | ||
curl --silent --output-dir _data/formula-core --output "$formula_raw.json" "https://formulae.brew.sh/api/formula/$formula.json" | ||
jq '.' "_data/formula-core/$formula_raw.json" > "_data/formula-core/$formula.json" | ||
rm -f "_data/formula-core/$formula_raw.json" | ||
|
||
# Make HTML file | ||
mkdir -p formula-core | ||
html="formula-core/$formula.html" | ||
cat << EOF > "$html" | ||
--- | ||
title: "$formula" | ||
layout: formula | ||
--- | ||
{{ content }} | ||
EOF | ||
|
||
# Make JSON file | ||
mkdir -p api/formula-core | ||
json="api/formula-core/$formula.json" | ||
cat << EOF > "$json" | ||
--- | ||
layout: formula_json | ||
--- | ||
{{ content }} | ||
EOF | ||
done |