]> git.madduck.net Git - code/mbuild.git/blob - rc

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

fix downloading of tarball, which needs debian revision
[code/mbuild.git] / rc
1 REPREPRO_DIR=$HOME/reprepro
2 BASE_URL=http://debian.madduck.net/repo
3
4 files=
5
6 print_repo_paths() {
7   local pkg; pkg="${1##*/}"; pkg="${pkg%%_*}"
8   local let; let="$(echo "$pkg" | cut -c1)"
9
10   sed -rne 's,^[[:space:]]+[[:xdigit:]]+ [[:digit:]]++ (([-[:alpha:]]+)/)?[-_[:alpha:]]+ [[:alpha:]]+ (.+$),\3 \2,p' "$1" | \
11     files="$(while read file section; do
12       case "$file" in
13         *.diff.gz|*.tar.gz) continue;;
14         *) echo "$BASE_URL/pool/${section:-main}/$let/$pkg/${file##*/}}";;
15       esac
16     done)"
17 }
18
19 dinstall() {
20   local dist
21   case "$1" in
22     stable*) dist=lenny;;
23     testing*) dist=squeeze;;
24     unstable) dist=sid;;
25     madduck) dist=madduck;;
26     experimental|*-backports) dist="$1";;
27     *) echo E: unknown distribution: "$1" >&2; exit 1;;
28   esac
29
30   copy_back_files "$@"
31
32   return 0
33
34   GNUPGHOME="$REPREPRO_DIR"/.gnupg \
35     reprepro --basedir "$REPREPRO_DIR" include "$dist" "$2" || :
36
37   print_repo_paths "$2"
38 }
39
40 print_bundle_location() {
41   local file; file="${1##*/}"
42   echo "$BASE_URL/bundles/$file"
43   #TODO: files does not work
44   echo "$files"
45 }
46
47 KEYID=330c4a75
48
49 BUNDLE_DIR=$REPREPRO_DIR/bundles
50
51 # vim:ft=sh