Skip to content

Commit 8c9c6f7

Browse files
authored
Update README.md
1 parent 8cf8ee2 commit 8c9c6f7

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ cat > hello.mojo <<EOF
6969
fn main():
7070
print("Hello word from mojo!")
7171
EOF
72+
73+
74+
7275
```
7376
----
7477
Run the mojo program:
@@ -80,4 +83,35 @@ Build and run the binary if you want:
8083
```bash
8184
!magic run mojo build hello.mojo
8285
!./hello
86+
87+
```
88+
## 📌 Check out only the cuda folder
89+
90+
**Use the following shell script snippet to checkout only the cuda folder**
91+
92+
```bash
93+
#!/bin/bash
94+
95+
REPO_URL="https://github.com/ratulb/mojo_programming"
96+
FOLDER_PATH="cuda"
97+
TARGET_DIR="${3:-$(basename "$REPO_URL" .git)}"
98+
99+
if [ -z "$FOLDER_PATH" ]; then
100+
echo "Usage: $0 [<target-dir>]"
101+
exit 1
102+
fi
103+
104+
echo "Cloning $FOLDER_PATH from $REPO_URL into $TARGET_DIR..."
105+
106+
git clone --filter=blob:none --no-checkout "$REPO_URL" "$TARGET_DIR"
107+
cd "$TARGET_DIR" || exit 1
108+
109+
git sparse-checkout init --cone
110+
git sparse-checkout set "$FOLDER_PATH"
111+
git checkout
112+
113+
echo "✅ Done. Folder '$FOLDER_PATH' is checked out in '$TARGET_DIR'."
114+
115+
```
116+
83117
```

0 commit comments

Comments
 (0)