From owner-freebsd-hackers@FreeBSD.ORG Thu May 8 16:22:53 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73F721065670 for ; Thu, 8 May 2008 16:22:53 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id 3B89A8FC2A for ; Thu, 8 May 2008 16:22:53 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.3/8.14.2) with ESMTP id m48GCkuI050087 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 8 May 2008 11:12:47 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.3/8.14.2/Submit) id m48GCkcq050085; Thu, 8 May 2008 11:12:46 -0500 (CDT) (envelope-from dan) Date: Thu, 8 May 2008 11:12:46 -0500 From: Dan Nelson To: Mathieu Prevot Message-ID: <20080508161246.GA2922@dan.emsphone.com> References: <3e473cc60805080659h721db611s886b80d213f9a2f3@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3e473cc60805080659h721db611s886b80d213f9a2f3@mail.gmail.com> X-OS: FreeBSD 7.0-STABLE User-Agent: Mutt/1.5.17 (2007-11-01) Cc: hackers@freebsd.org Subject: Re: binary file within a shell script X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 May 2008 16:22:53 -0000 In the last episode (May 08), Mathieu Prevot said: > Hi there, > > I would like to use one exec file from a shellscript but I would like > it to be incorporated in the same file, like Nvidia do for its FreeBSD > drivers. How can I do this in a convenient way ? Take a look at the file generated by /usr/bin/gzexe; that's one way to do it (basically, determine the number of lines in your shell script, append your binary file to the end of the script, and use tail to extract only the binary file to a tempfile). -- Dan Nelson dnelson@allantgroup.com