File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,9 @@ cat > hello.mojo <<EOF
6969fn main():
7070 print("Hello word from mojo!")
7171EOF
72+
73+
74+
7275```
7376----
7477Run 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```
You can’t perform that action at this time.
0 commit comments