]> git.pld-linux.org Git - projects/distfiles.git/blob - show_spec.sh
(Temporarily) support both scp and ftp
[projects/distfiles.git] / show_spec.sh
1 #!/bin/sh
2
3 GIT_SERVER=git.pld-linux.org
4
5 package=$1
6 ref=$2
7
8 exticode=0
9
10 export GIT_DIR=`mktemp -d gitemp.XXXXXX --tmpdir`
11 (
12     set -e
13     git init --bare >/dev/null
14     git fetch --depth=1 git://${GIT_SERVER}/packages/$package $ref:
15     git ls-tree --name-only FETCH_HEAD | grep '.spec$' | while read file; do
16         git show FETCH_HEAD:$file > $package || exitcode=1
17     done
18
19     # checkout additional file for source/patch-md5
20     file=sources
21     if git ls-tree --name-only FETCH_HEAD | grep -q ^$file$; then
22         git show FETCH_HEAD:$file > $file || exitcode=1
23     fi
24 )
25 exitcode=$?
26 rm -rf $GIT_DIR
27 exit $exitcode
This page took 0.023305 seconds and 3 git commands to generate.