metron-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JonZeolla <...@git.apache.org>
Subject [GitHub] incubator-metron pull request #429: METRON-660 [Umbrella] up-to-date version...
Date Tue, 31 Jan 2017 14:18:06 GMT
Github user JonZeolla commented on a diff in the pull request:

    https://github.com/apache/incubator-metron/pull/429#discussion_r98674950
  
    --- Diff: site-book/bin/generate-md.sh ---
    @@ -190,7 +190,13 @@ cd site-book/src/site/markdown
     # Rewrite hrefs for resource references, using table provided by Maintainers
     for (( i=0; i<${#HREF_REWRITE_LIST[@]} ; i+=2 )) ; do
         echo rewriting href in "${HREF_REWRITE_LIST[$i]}" : "${HREF_REWRITE_LIST[ $(( i +
1 )) ]}"
    -    sed -i '' -e "${HREF_REWRITE_LIST[ $(( i + 1 )) ]}" "${HREF_REWRITE_LIST[$i]}"
    +    if [[ "$OSTYPE" =~ "darwin" ]] ; then
    +        # Macs need an argument after -i option 
    +        sed -i '' -e "${HREF_REWRITE_LIST[ $(( i + 1 )) ]}" "${HREF_REWRITE_LIST[$i]}"
    +    else
    --- End diff --
    
    I would suggest handling this slightly more explicitly.  My two thoughts are:
    1.  Approach it similar to [here](https://github.com/anandsubbu/incubator-metron/blob/dc3fa9739bad53da7931d992cdfd499abba5387d/metron-deployment/scripts/platform-info.sh#L68),
using a `case "${OSTYPE}"` to watch `darwin*` and `linux*`, and then a `*)` that alerts the
user.
    1. By adding an elif for either `"${OSTYPE}" == linux*` or `"${OSTYPE}" =~ "linux"`, and
then an `else` that alerts the user.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message