diff options
author | Aaron Griffin <aaron@archlinux.org> | 2006-12-05 08:30:15 +0100 |
---|---|---|
committer | Aaron Griffin <aaron@archlinux.org> | 2006-12-05 08:30:15 +0100 |
commit | 6ec8dfc2f3b0923695ad740ac7836a8944073663 (patch) | |
tree | c3a54353bb46094c29cdeac8cae413764ee62971 | |
parent | aad3f6ab1f5e3deac46f13ad5975d9be0759103f (diff) | |
download | pacman-6ec8dfc2f3b0923695ad740ac7836a8944073663.tar.gz pacman-6ec8dfc2f3b0923695ad740ac7836a8944073663.tar.xz |
Added 'abs' and configs to CVS
* Added testing-usability to abs
-rw-r--r-- | etc/abs/supfile.arch | 21 | ||||
-rw-r--r-- | etc/abs/supfile.community | 14 | ||||
-rw-r--r-- | etc/abs/supfile.extra | 14 | ||||
-rw-r--r-- | etc/abs/supfile.testing | 15 | ||||
-rw-r--r-- | etc/abs/supfile.unstable | 14 | ||||
-rw-r--r-- | scripts/abs | 96 |
6 files changed, 174 insertions, 0 deletions
diff --git a/etc/abs/supfile.arch b/etc/abs/supfile.arch new file mode 100644 index 00000000..180e24d2 --- /dev/null +++ b/etc/abs/supfile.arch @@ -0,0 +1,21 @@ +# +# /etc/abs/supfile +# + +# this is the host containing the master ABS files +*default host=cvs.archlinux.org + +*default release=cvs +*default delete +*default use-rel-suffix +*default compress + +# +# Set tag equal to the package tree you wish to follow. CURRENT and +# STABLE are the most commonly used, but you can specify specific +# versions or tag names. Examples are RELEASE_0_2, VEGA, RELEASE_0_3, +# FIREFLY, etc. +# +*default tag=CURRENT + +arch diff --git a/etc/abs/supfile.community b/etc/abs/supfile.community new file mode 100644 index 00000000..9394dc69 --- /dev/null +++ b/etc/abs/supfile.community @@ -0,0 +1,14 @@ +# +# /etc/abs/supfile.community +# + +# this is the host containing the community PKGBUILD files +*default host=cvs.archlinux.org + +*default release=cvs +*default delete +*default use-rel-suffix +*default compress + +*default tag=CURRENT +community diff --git a/etc/abs/supfile.extra b/etc/abs/supfile.extra new file mode 100644 index 00000000..14fa9793 --- /dev/null +++ b/etc/abs/supfile.extra @@ -0,0 +1,14 @@ +# +# /etc/abs/supfile.extra +# + +# this is the host containing the extra PKGBUILD files +*default host=cvs.archlinux.org + +*default release=cvs +*default delete +*default use-rel-suffix +*default compress + +*default tag=CURRENT +extra diff --git a/etc/abs/supfile.testing b/etc/abs/supfile.testing new file mode 100644 index 00000000..f409fe2b --- /dev/null +++ b/etc/abs/supfile.testing @@ -0,0 +1,15 @@ +# +# /etc/abs/supfile +# + +# this is the host containing the master ABS files +*default host=cvs.archlinux.org + +*default release=cvs +*default delete +*default use-rel-suffix +*default compress +*default tag=TESTING + +arch +extra diff --git a/etc/abs/supfile.unstable b/etc/abs/supfile.unstable new file mode 100644 index 00000000..7642bf20 --- /dev/null +++ b/etc/abs/supfile.unstable @@ -0,0 +1,14 @@ +# +# /etc/abs/supfile.unstable +# + +# this is the host containing the unstable PKGBUILD files +*default host=cvs.archlinux.org + +*default release=cvs +*default delete +*default use-rel-suffix +*default compress + +*default tag=CURRENT +unstable diff --git a/scripts/abs b/scripts/abs new file mode 100644 index 00000000..36fe4c04 --- /dev/null +++ b/scripts/abs @@ -0,0 +1,96 @@ +#!/bin/bash +# vim: set ft=sh ts=2 sw=2 + +[ -f /etc/abs/abs.conf ] && source /etc/abs/abs.conf + +usage() { + echo "Arch Build System -- synchronization utility" + echo "usage: $0 [-p] [repository1 [repository2 ...]]" + echo + echo "abs will synchronize PKGBUILD scripts from the CVS repository" + echo "into $ABSROOT. You can follow different package trees by" + echo "editing /etc/abs/supfile.* files. If no argument is given, abs " + echo "will synchronize from supfiles specified in /etc/abs/abs.conf." + echo "If -p is specified, the connection is opened in passive mode." +} + +update() { + cd $ABSROOT + for sup in "${SUPFILES[@]}"; do + if [ "$sup" != "testing" ]; then + if [ "$sup" = "${sup#!}" ]; then + cvsup -L 1 -r 0 -g -b $ABSROOT -c .sup /etc/abs/supfile.$sup + fi + elif [ "$sup" = "testing" ]; then + if [ ! -d /var/abs/testing ]; then + mkdir /var/abs/testing; + fi + cd $ABSROOT/testing + cvsup -L 1 -r 0 -g -b $ABSROOT/testing -c .sup /etc/abs/supfile.testing + cd $ABSROOT + fi + done +} + + +update() { + cd $ABSROOT + for sup in "${SUPFILES[@]}"; do + if [ "$sup" = "${sup#!}" ]; then + $CVSUP -L 1 -r 0 -g -b $ABSROOT -P $CONNMODE -c .sup /etc/abs/supfile.$sup + fi + done +} + +if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then + usage + exit 0 +fi + +if [ ! -d $ABSROOT ]; then + echo "abs: $ABSROOT does not exist (or is not a directory)" + exit 1 +fi +if [ ! -w $ABSROOT ]; then + echo "abs: no write permissions in $ABSROOT" + exit 1 +fi + +if [ "`type -p cvsup`" ]; then + CVSUP="cvsup" +elif [ "`type -p csup`" ]; then + CVSUP="csup" +else + echo "abs: missing CVS synchronization utility. Install cvsup or csup." + exit 1 +fi + +if [ ! -d "$ABSROOT" ]; then + echo "abs: directory $ABSROOT does not exist" + exit 1 +fi + +if [ "$1" = "-p" ] || [ "$1" = "--passive" ]; then + CONNMODE="-" + shift +else + CONNMODE="m" + shift +fi + +if [ "$1" = "-p" ] || [ "$1" = "--passive" ]; then + CONNMODE="-" + shift +else + CONNMODE="m" + shift +fi + +if [ "$#" -ne "0" ]; then + SUPFILES=("$@") +fi + +update + +exit 0 +# vim: set ts=2 noet: |