Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
executable file
·
56 lines (43 loc) · 1.7 KB

File metadata and controls

executable file
·
56 lines (43 loc) · 1.7 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
set -e
set -x
# Directory where docs repo is cloned (should match push-docs.sh)
DOCS_REPO_DIR=${CLONE_DIR:-"./imx-docs"}
# Root of the example apps
EXAMPLES_ROOT="./examples"
# Products to process
PRODUCTS=("passport" "checkout" "orderbook" "contracts")
# Process tutorials for each product
for PRODUCT in "${PRODUCTS[@]}"; do
echo "Processing tutorials for $PRODUCT..."
# Create _tutorials directory in docs repo if it doesn't exist
TUTORIALS_DIR="$DOCS_REPO_DIR/docs/main/example/zkEVM/$PRODUCT-examples/_tutorials"
mkdir -p "$TUTORIALS_DIR"
# Get all example apps for this product
SAMPLE_APPS=$(ls -d $EXAMPLES_ROOT/$PRODUCT/*/ 2>/dev/null | xargs -n1 basename)
for APP in $SAMPLE_APPS; do
TUTORIAL_FILE="$EXAMPLES_ROOT/$PRODUCT/$APP/tutorial.md"
# Check if tutorial.md exists
if [ -f "$TUTORIAL_FILE" ]; then
echo "Processing tutorial for $APP..."
# Copy the content to a new file named after the app
cp "$TUTORIAL_FILE" "$TUTORIALS_DIR/${APP}.md"
echo "Copied $TUTORIAL_FILE to $TUTORIALS_DIR/${APP}.md"
else
echo "No tutorial.md found for $APP, skipping..."
fi
done
# Also copy the generated JSON file
JSON_FILE="$EXAMPLES_ROOT/_parsed/${PRODUCT}-examples.json"
if [ -f "$JSON_FILE" ]; then
# Create directory for JSON file if it doesn't exist
JSON_DIR="$DOCS_REPO_DIR/docs/main/example/zkEVM/$PRODUCT-examples"
mkdir -p "$JSON_DIR"
# Copy JSON file
cp "$JSON_FILE" "$JSON_DIR/${PRODUCT}-examples.json"
echo "Copied $JSON_FILE to $JSON_DIR/${PRODUCT}-examples.json"
else
echo "Warning: No ${PRODUCT}-examples.json found at $JSON_FILE"
fi
done
echo "Tutorial processing complete."
Morty Proxy This is a proxified and sanitized view of the page, visit original site.