summaryrefslogtreecommitdiff
path: root/aur.sh
blob: edb70ca36f0aec1738bbc11eec06115227d0b675 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh

set -e

PACKAGES="opcut
          python-hat-aio
          python-hat-doit
          python-hat-json
          python-hat-util"

cd $(dirname -- "$0")

mkdir -p aur

for PACKAGE in $PACKAGES; do

    echo -n "$PACKAGE... "

    if [ -d aur/$PACKAGE ]; then
        git -C aur/$PACKAGE pull -q
    else
        git -C aur clone -q ssh://aur@aur.archlinux.org/$PACKAGE.git
    fi

    for SRC in $(find $PACKAGE -type f -a -not -name .gitignore); do
        if ! git check-ignore -q $SRC; then
            cp $SRC aur/$SRC
        fi
    done

    (cd aur/$PACKAGE; makepkg --printsrcinfo > .SRCINFO)

    if git -C aur/$PACKAGE diff --quiet; then
        echo "OK"
    else
        echo "CHANGED"
    fi

done