Created
June 13, 2015 07:45
-
-
Save dlintw/59541c21a10c81605ebb to your computer and use it in GitHub Desktop.
upgrade aur4 script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| readonly MYDIR=$PWD | |
| PKGS=( | |
| # java3d | |
| # bvi | |
| # xxdiff | |
| # ccal | |
| # tmux-mem-cpu-load-git | |
| # bcpp | |
| # vim-voom | |
| ## vim-dirdiff | |
| # allin1 | |
| # yaffs2utils-svn | |
| # vim-tabular-git | |
| # upgradepic | |
| ######### lonote | |
| # go-crosstool | |
| # herd | |
| # fossil-tip | |
| # zmqc-git | |
| # xxdiff-hg | |
| # vim-dotoutlinetree | |
| # sockperf-svn | |
| # sockperf-git | |
| # sh4-elf-binutils | |
| # sh-linux-api-headers | |
| python2-grs-git | |
| python2-googl-hg | |
| genseat-git | |
| fix8-git | |
| ) | |
| #PKGS=(java3d) | |
| ask() { | |
| local ans | |
| if [[ $# -ge 1 ]] ; then | |
| read -p "$*, Continue?" ans | |
| else | |
| read -p "Continue?" ans | |
| fi | |
| } | |
| merge() { | |
| local pkg=$1 | |
| local pkg2="${1:0:2}" | |
| ask will build $pkg | |
| cd $MYDIR | |
| git clone ssh://[email protected]/$pkg.git || ask | |
| curl -LO https://aur.archlinux.org/packages/$pkg2/$pkg/$pkg.tar.gz || ask | |
| tar xf $pkg.tar.gz || ask | |
| cd $pkg | |
| cp ../gitignore .gitignore || ask | |
| mksrcinfo || ask | |
| git add -A || ask | |
| git add PKGBUILD || ask | |
| makepkg -s || ask | |
| namcap *.pkg.tar.xz || ask | |
| git st || ask | |
| ask commit | |
| git ci -m "merge to aur4" | |
| git push | |
| echo "*** $pkg DONE" | |
| } | |
| main() { | |
| set -xeu | |
| local pkg | |
| for pkg in "${PKGS[@]}" ; do | |
| merge $pkg | |
| done | |
| } | |
| main "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment