On Fri, Jan 03, 2014 at 04:36:26PM +0000, Roy Marples wrote:
> Hi List
>
> Can fossil create an archive (tarball, zip file, etc) from a given
> artifact id WITHOUT using the web interface?
> Something like this is what I need:
> $ fossil archive ?ID | bzip2 > distribution-version.tar.bz2
>
> Thanks
>
> Roy
Good morning,
You could kludge it together using other features. Here is an untested
script to give a rough idea.
Cheers,
-Ben
$ cat >fossil-archive.sh <<__EOF__
#!/bin/sh
url="$1"
id="${2:-trunk}"
if [ -z "$url" ]
then
echo "Usage: fossil-archive.sh URL ?ID"
exit 0
fi
dir=$(mktemp -d)
subdir="dist-$id"
cd "$dir"
fossil clone "$url" dist.fossil
mkdir "$subdir"
cd -
cd "$dir/$subdir"
fossil open "$dir/dist.fossil" "$id"
cd -
cd "$dir"
tar jc "$subdir"
cd -
rm -fr "$dir"
__EOF__
$ chmod a+rx fossil-archive.sh
$ ./fossil-archive.sh http://foo/bar >dist-trunk.tar.bz2
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users