]> 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:

lenny is out
[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     experimental|*-backports) dist="$1";;
26     *) echo E: unknown distribution: "$1" >&2; exit 1;;
27   esac
28
29   copy_back_files "$@"
30
31   GNUPGHOME="$REPREPRO_DIR"/.gnupg \
32     reprepro --basedir "$REPREPRO_DIR" include "$dist" "$2" || :
33
34   print_repo_paths "$2"
35 }
36
37 print_bundle_location() {
38   local file; file="${1##*/}"
39   echo "$BASE_URL/bundles/$file"
40   #TODO: files does not work
41   echo "$files"
42 }
43
44 KEYID=330c4a75
45
46 BUNDLE_DIR=$REPREPRO_DIR/bundles
47
48 # vim:ft=sh