git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: nightly tarballs of git

From
Junio C Hamano <junkio@cox.net>
Date
Sep 14, 2006, 20:06 UTC
Message-ID
<7virjq2oyc.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060914193616.GA32735@redhat.com>
Dave Jones <davej@redhat.com> writes:
Show 13 quoted lines
> DATE=`date +%Y-%m-%d`
>
> PROJ="git"
> cd ~/git-trees
> if [ -d $PROJ ]; then
>   cd $PROJ
>   git pull -n
> else
>   git clone -q git://git.kernel.org/pub/scm/git/git.git
>   cd $PROJ
> fi
> snap=git-snapshot-$(date +"%Y%m%d")
> git-tar-tree HEAD $snap | gzip -9 > $PROJ-$DATE.tar.gz

If you are using git-tar-tree (which by the way _is_ the right thing to do) and if you are just taking an upstream snapshot without doing your own development (which also is the case here), then you do not even need a working tree in the directory this script runs. It would save your disk space and time to check out the updated working tree files.

Perhaps...

#!/bin/sh URL=git://git.kernel.org/pub/scm/git/git.git PROJ=git

cd ~/git-trees
if test -d "$PROJ"
then
	cd "$PROJ" && git fetch
else
	git clone -q -n "$URL" "$PROJ" && cd "$PROJ"
fi || {
	echo >&2 Something wicked happend.
        exit $?
}
snap=git-snapshot-$(date +"%Y%m%d")
git-tar-tree origin $snap | gzip -9 > $PROJ-$DATE.tar.gz
Previous: Jakub NarebskiNext: Dave Jones
Message 5 of 9 in “Re: nightly tarballs of git”
  1. Dave JonesSep 14, 2006
  2. Junio C HamanoSep 14, 2006
  3. Dave JonesSep 14, 2006
  4. Jakub NarebskiSep 14, 2006
  5. Junio C HamanoSep 14, 2006
  6. Dave JonesSep 16, 2006
  7. Jakub NarebskiSep 16, 2006
  8. Junio C HamanoSep 16, 2006
  9. Dave JonesSep 17, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.