|
37 | 37 | mv ./temp/projectA/* ./projectB/docs/$REPO_NAME/ |
38 | 38 | echo "Readme files moved to /docs/$REPO_NAME/" |
39 | 39 |
|
| 40 | + # Special handling for Norigin-Spatial-Navigation |
| 41 | + # This section combines the README from the repo with detailed content from the dev portal |
| 42 | + if [ "$REPO_NAME" = "Norigin-Spatial-Navigation" ]; then |
| 43 | + echo "Combining README with detailed documentation for Spatial Navigation" |
| 44 | + |
| 45 | + # Define file paths |
| 46 | + README_FILE="./projectB/docs/$REPO_NAME/README.md" # The README pulled from the repo |
| 47 | + DETAILED_DOCS="./projectB/docs/Spat-Nav/Detailed_README_SpatNav.md" # The detailed content file |
| 48 | + |
| 49 | + # Check if the detailed docs file exists |
| 50 | + if [ -f "$DETAILED_DOCS" ]; then |
| 51 | + echo "Found detailed documentation file: $DETAILED_DOCS" |
| 52 | + |
| 53 | + # Use sed to replace the marker with the detailed content |
| 54 | + # The 'r' command reads the file and inserts it after the line containing the marker |
| 55 | + # The second sed command removes the marker line itself |
| 56 | + sed -i '/<!-- INSERT_DETAILED_README_SPATNAV_HERE -->/r ./projectB/docs/Spat-Nav/Detailed_README_SpatNav.md' "$README_FILE" |
| 57 | + sed -i '/<!-- INSERT_DETAILED_README_SPATNAV_HERE -->/d' "$README_FILE" |
| 58 | + |
| 59 | + # Remove dev portal link (if it exists) - this prevents the link from appearing in the dev portal |
| 60 | + # Remove lines containing common dev portal link patterns |
| 61 | + sed -i '/^# Developer Portal$/d' "$README_FILE" # Remove the heading |
| 62 | + sed -i '/\[.*dev.*portal.*\]/d' "$README_FILE" # Remove markdown links to dev portal |
| 63 | + sed -i '/\[.*developer.*portal.*\]/d' "$README_FILE" # Remove markdown links to developer portal |
| 64 | + sed -i '/https:\/\/.*dev.*portal.*/d' "$README_FILE" # Remove direct URLs to dev portal |
| 65 | + sed -i '/For more detailed documentation.*visit our.*Developer Portal/d' "$README_FILE" # Remove the descriptive text |
| 66 | + |
| 67 | + echo "Successfully combined README with detailed documentation" |
| 68 | + else |
| 69 | + echo "Warning: Detailed documentation file not found at $DETAILED_DOCS" |
| 70 | + echo "The marker will remain in the README" |
| 71 | + fi |
| 72 | + fi |
| 73 | +
|
40 | 74 | mkdir -p ./projectB/static/$IMAGES_FOLDER |
41 | 75 | mkdir -p ./projectA/$IMAGES_FOLDER |
42 | 76 | if [[ `ls ./projectA/$IMAGES_FOLDER` != "" ]] |
|
0 commit comments