1 2 3 4 5 6 7 8 9 10 11
#!/bin/bash source $PWD/PKGBUILD for url in $(echo ${source[@]}|xargs -n1|grep "^git"|sed -e 's/git+//' -e 's/#commit=.*//') do d=${url##*/} d=${d%.git} git clone --filter=tree:0 $url $d (cd $d;git worktree add tmp;git worktree remove tmp;git branch -d tmp) done