]> git.pld-linux.org Git - projects/distfiles.git/blame - show_spec.sh
(Temporarily) support both scp and ftp
[projects/distfiles.git] / show_spec.sh
CommitLineData
ad64e6a8
KK
1#!/bin/sh
2
5dce15c6 3GIT_SERVER=git.pld-linux.org
ad64e6a8
KK
4
5package=$1
6ref=$2
7
8exticode=0
9
10export 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
8b8c50a0
ER
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
ad64e6a8
KK
24)
25exitcode=$?
26rm -rf $GIT_DIR
27exit $exitcode
This page took 0.210608 seconds and 4 git commands to generate.