|
所谓devel包,就是指以-cvs, -svn, -git, -bzr等结尾的包,虽说用yaourt也可以做到,但每次都要自己修改人家的pkgbuild实在麻烦,何况有些包是aur上没有的。本脚本就是为了方便更新本地devel包而写的,希望对每天都要一个一个包手动更新的同学有帮助。欢迎指正。- #!/bin/bash
- a=$PWD
- echo "###Updating svn pkgs...###"
- for i in *-svn; do
- d=$(echo $i|sed -e 's/-svn//g')
- cd $a/$i/src/$d
- echo "###Updating "$i"...###"
- svn up
- echo "###"$i "is updated!###"
- echo ""
- done
- echo "###Updating cvs pkgs...###"
- cd $a
- for i in *-cvs; do
- d=$(echo $i|sed -e 's/-cvs//g')
- cd $a/$i/src/$d
- echo "###Updating "$i"...###"
- cvs update
- echo "###"$i "is updated!###"
- echo ""
- done
- echo "###Updating bzr pkgs...###"
- cd $a
- for i in *-bzr; do
- d=$(echo $i|sed -e 's/-bzr//g')
- cd $a/$i/src/$d
- echo "###Updating "$i"...###"
- bzr up
- echo "###"$i "is updated!###"
- echo ""
- done
- echo "###Updating git pkgs...###"
- cd $a
- for i in *-git; do
- d=$(echo $i|sed -e 's/-git//g')
- cd $a/$i/src/$d
- echo "###Updating "$i"...###"
- git pull
- echo "###"$i "is updated!###"
- echo ""
- done
- echo "###All up-to-date!###"
复制代码 |
|