[aur-general] AUR4 feature request

Eli Schwartz eschwartz93 at gmail.com
Sun Jun 14 04:43:19 UTC 2015

On Sat, Jun 13, 2015 at 11:29 PM, Ralf Mardorf <info.mardorf at rocketmail.com>

> Thank you Eli,
> good to know a way to save disk space, assumed it's needed and/or
> wanted.
> At the moment it's convenient for me to clone it.
> $ du -sh /var/aur/
> 1.7G    /var/aur/
> Regards,
> Ralf

:-P Please at least do a sparse checkout!

[eschwartz at arch ~]$ cat bin/aur-mirroring


if [[ ! -e "${aurdir}" ]]; then
    echo "aur-mirror (${aurdir}) directory does not exist, initializing
(without checkout)..."
    git clone -n git://pkgbuild.com/aur-mirror.git "${aurdir}"
    cd "${aurdir}"
    git config core.sparseCheckout true

    echo "creating sparse-checkout list from pacman..."
    pacman -Qqm > .git/info/sparse-checkout

    echo "checking out specified packages..."
    git checkout master
elif [[ ! -d "${aurdir}" ]];then
    echo "${aurdir} is not a directory, oops!"
    exit 1
elif [[ ! -d "${aurdir}"/.git ]]; then
    echo "${aurdir} is not a repository, oops!"
    exit 2
    cd "${aurdir}"
    echo "rebuilding sparse-checkout list from pacman..."
    (cat .git/info/sparse-checkout; pacman --config
/etc/pacman-nocustom.conf -Qqm)|sort -u | tee .git/info/sparse-checkout
    echo "updating repo..."
    git read-tree -mu HEAD
    git pull

-- Eli Schwartz

More information about the aur-general mailing list