LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 848|回复: 0

让ABS同步testing分支[Syncing testing with ABS,from Arch's mailing list]

[复制链接]
发表于 2005-3-26 01:53:13 | 显示全部楼层 |阅读模式
I've managed to hack abs so it will sync testing. Here are the files:
>>我修改了abs的一些文件以使它同步testing分支,下面就是这些文件:


--- /usr/bin/abs --

  1. #!/bin/bash

  2. [ -f /etc/abs/abs.conf ] && source /etc/abs/abs.conf

  3. usage() {
  4.         echo "Arch Build System -- synchronization utility"
  5.         echo "usage: $0 [repository1 [repository2 ...]]"
  6.         echo
  7.         echo "abs will synchronize PKGBUILD scripts from the CVS
  8. repository"
  9.         echo "into $ABSROOT.  You can follow different package trees
  10. by"
  11.         echo "editing /etc/abs/supfile.* files.  If no argument is
  12. given, abs "
  13.         echo "will synchronize from supfiles specified in
  14. /etc/abs/abs.conf"
  15. }

  16. update() {
  17.         cd $ABSROOT
  18.         for sup in "${SUPFILES[@]}"; do
  19.                 if [ "$sup" != "testing" ]; then
  20.                         if [ "$sup" = "${sup#!}" ]; then
  21.                                 cvsup -L 1 -r 0 -g -b $ABSROOT -c .sup
  22. /etc/abs/supfile.$sup
  23.                         fi
  24.                         elif [ "$sup" = "testing" ]; then
  25.                                 if [ ! -d /var/abs/testing ]; then
  26. mkdir /var/abs/testing; fi
  27.                                 cd $ABSROOT/testing
  28.                                 cvsup -L 1 -r 0 -g -b $ABSROOT/testing
  29. -c .sup /etc/abs/supfile.testing
  30.                                 cd $ABSROOT
  31.                 fi
  32.         done            
  33. }

  34. if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
  35.         usage
  36.         exit 0
  37. fi

  38. if [ ! -w $ABSROOT ]; then
  39.         echo "abs: no write permissions in $ABSROOT"
  40.         exit 1
  41. fi

  42. if [ ! `type -p cvsup` ]; then
  43.         echo "abs: cvsup was not found in PATH.  Install cvsup"
  44.         exit 1
  45. fi

  46. if [ ! -d "$ABSROOT" ]; then
  47.         echo "abs: directory $ABSROOT does not exist"
  48.         exit 1
  49. fi

  50. if [ "$#" -ne "0" ]; then
  51.         SUPFILES=("$@")
  52. fi

  53. update

  54. exit 0
复制代码


--- /etc/abs/supfile.testing ---

  1. #
  2. # /etc/abs/supfile
  3. #

  4. # this is the host containing the master ABS files
  5. *default host=cvs.archlinux.org

  6. *default release=cvs
  7. *default delete
  8. *default use-rel-suffix
  9. *default compress
  10. *default tag=TESTING

  11. arch
  12. extra
复制代码


Whack those into their appropriate places, pop 'testing' into the
supfiles array in abs.conf, and run abs. You should be golden.
>>把这些文件放到应在的位置(别忘了改权限)。再在/etc/abs/abs.conf里的SUPFILES
>>里加入testing,然后执行abs。
~Celti
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表