🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: uk.comp.os.linux
Article #891

Re: How to make tarballs?

#891
From: Nate Eldredge
Date: Fri, 24 Mar 2000 00:00
39 lines
2069 bytes
philh@vision25.demon.co.uk (phil hunt) writes:

> How do people make tarballs?
> 
> This is not as stupid a question as it sounds. I know the 'tar'
> command, and I know that for example:
> 
>    tar czvf parrot-0.2.5.tgz parrot-0.2.5/
> 
> will create a file 'parrot-0.2.5.tgz' which when untarred will
> put its contents in a subdirectory called 'parrot-0.2.5'.
> 
> The way i do this is that first I create a directory parrot-0.2.5/
> which contains evereything I want to include from the parrot/ directory
> to go into the tarball. This is potentially error-prone, especially
> as it is a routine (& therefore boring) administrative task. Then I 
> execute the tar command above.
> 
> Is there an easier way?

For a software distribution, I add this to the Makefile, so the boring
administrative task gets automated.

DIST_FILES = foo bar baz qux
VERSION=1.2.3

foo-$(VERSION).tar.gz : $(DIST_FILES)
        mkdir foo-$(VERSION)
        cp $(DIST_FILES) foo-$(VERSION)
        tar cvvvzf $< foo-$(VERSION)

tar : foo-$(VERSION).tar.gz

and then I can just `make tar'.

-- 

Nate Eldredge
neldredge@hmc.edu
Technical Details
Message-ID: <83d7okqhtb.fsf@mercury.st.hmc.edu>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <slrn8dmspm.9sp.philh@vision25.demon.co.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10c696,5ebef2ff092e0af0
X-Google-Attributes: gid10c696,public
X-Google-Thread: 10d8ad,5ebef2ff092e0af0
X-Google-Attributes: gid10d8ad,public
X-Google-Thread: 1025b4,5ebef2ff092e0af0
X-Google-Attributes: gid1025b4,public
From: Nate Eldredge <neldredge@hmc.edu>
Subject: Re: How to make tarballs?
Date: 2000/03/24
Message-ID: <83d7okqhtb.fsf@mercury.st.hmc.edu>
X-Deja-AN: 601882906
References: <slrn8dmspm.9sp.philh@vision25.demon.co.uk>
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: usenet@nntp1.interworld.net
X-Trace: nntp1.interworld.net 953926845 90543 134.173.45.219 (24 Mar 2000 19:40:45 GMT)
Organization: InterWorld Communications
Mime-Version: 1.0
User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.5
NNTP-Posting-Date: 24 Mar 2000 19:40:45 GMT
Newsgroups: uk.comp.os.linux,comp.os.linux.development.apps,gnu.misc.discuss