home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.os.linux.gentoo      Stupid OS you gotta compile EVERYTHING      17,684 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 16,251 of 17,684   
   Nikos Chantziaras to All   
   here-documents in ebuild   
   12 Apr 08 22:44:29   
   
   From: realnc@arcor.de   
      
   I'm writing an ebuild that has a src_test() and one of the tests needs   
   to be a here-document (command <<- EOF).  But I need to do a 'die   
   "Failed"' call if the test fails and I can't get the syntax right.   
   Imagine this:   
      
   src_test() {   
        ./frob <<- EOF || die "frob failed"   
            foo   
            bar   
        EOF   
   }   
      
   It passes 'ebuild digest' but fails on emerge.  What's the right syntax?   
     Here's the error message:   
      
   [...]temp/environment: line 2329: syntax error near unexpected token `||'   
   [...]/temp/environment: line 2329: ` || die "frob failed";'   
     *   
     * Call stack:   
     *               ebuild.sh, line 1641:  Called die   
     * The specific snippet of code:   
     *      preprocess_ebuild_env || \   
     *              die "error processing environment"   
     *  The die message:   
     *   error processing environment   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca