Actually, it's not "correct behavior"
      to modify files by setting permissions.  You don't know what the
      original author intended and it's not our script's business to
      change the file being executed.  The script as submitted
      accommodates both instances: when the file is an executable (even
      a binary, if the user so desires!), or a potential shell-script. 
      Changing permissions is, in my view, an extra step that it is
      incorrect to take given the script's intent.
      Cheers...
          Diego Rivera
      On 04/30/2013 09:43 AM, Stefan Saraev wrote:
    
      In
        packages/addons/service/multimedia/tvheadend/source/bin/tv_grab_file:
      > @@ -36,6 +37,13 @@ if [[ $# -lt 1 ]]; then
>    if [ "$XMLTV_TYPE" = "FILE" ]; then
>      cat "$XMLTV_LOCATION_FILE"
>      exit 0
> +  elif [ "$XMLTV_TYPE" = "SCRIPT" ]; then
> +    if [ -x "$XMLTV_LOCATION_SCRIPT" ] ; then
> +      exec "$XMLTV_LOCATION_SCRIPT"
> +    else
> +      /bin/sh "$XMLTV_LOCATION_SCRIPT"
> +      exit $?
> +    fi

      that's right, but then, again, '/bin/sh "$XMLTV_..." shouldn't
        be there then ;) 
        I would suggest:
          if [ -e "$XMLTV_LOCATION_SCRIPT" ] ; then
      chmod a+x "$XMLTV_LOCATION_SCRIPT"
      exec "$XMLTV_LOCATION_SCRIPT"
    fi

      will test and merge later @ home. thanks
      —
        Reply to this email directly or view
          it on GitHub.