summarylogtreecommitdiffstats
path: root/send.sh
blob: ee6b1dc6222e358a1a627e67394c3b6da3a65d75 (plain)
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 -e

PROG="fuse-tar"

cp ../PKGBUILD PKGBUILD

# Read the package version
pkgver=$(grep '^pkgver=' PKGBUILD | sed 's/pkgver=//')

# Download the current release
wget "https://github.com/Benni3D/${PROG}/archive/v${pkgver}.tar.gz"

# Change the md5sums
sed -i "s/^md5sums=.*/md5sums=\\('$(md5sum v${pkgver}.tar.gz | awk '{print $1}')'\\)/" PKGBUILD

# Clean up
rm v${pkgver}.tar.gz

# Generate .SRCINFO
change() {
   grep "^$1=" PKGBUILD | sed "s/$1=/\t$1 = /;s/\${pkgver}/${pkgver}/" | tr -d "\"'()" >> .SRCINFO
}
echo "pkgbase = ${PROG}" > .SRCINFO
change pkgdesc
change pkgver
change pkgrel
change url
change arch
change license
change depends
change optdepends
change source
change md5sums
printf "\npkgname = ${PROG}\n\n" >> .SRCINFO

# Push to AUR repository
git add .
git commit -m "Update"
git push origin master