pacman/scripts/abs

52 lines
865 B
Text
Raw Normal View History

2002-08-09 18:03:48 +00:00
#!/bin/bash
2002-09-16 05:22:13 +00:00
myver='2.1'
2002-08-09 18:03:48 +00:00
ABS_ROOT=/usr/abs
usage() {
echo "abs $myver"
echo "usage: $0"
echo
echo "abs will synchronize PKGBUILD scripts from the CVS repository"
echo "into /usr/abs. You can follow different package trees by editing"
2002-09-16 05:22:13 +00:00
echo "/etc/abs/supfile.arch"
2002-08-09 18:03:48 +00:00
echo
exit 0
}
update() {
if [ ! `type -p cvsup` ]; then
echo "abs: cvsup was not found in PATH. Install cvsup"
exit 1
fi
if [ ! -d "$ABS_ROOT" ]; then
echo "abs: directory $ABS_ROOT does not exist"
exit 1
fi
if [ "`id -u`" != "0" ]; then
echo "abs: you must be root to update your ABS tree"
exit 1
fi
2002-09-16 05:22:13 +00:00
for sup in `find /etc/abs -name "supfile.*"`; do
cd $ABS_ROOT && cvsup -L 1 -r 0 -g -c .sup $sup
done
2002-08-09 18:03:48 +00:00
}
for opt in "$@"; do
case $opt in
-h|--help)
usage
exit 0 ;;
*)
echo "abs: invalid option \"$opt\""
exit 1 ;;
esac
done
update
exit 0