2016-09-10 09:25:11 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2016-09-10 10:35:54 +00:00
|
|
|
git clone git+ssh://aur@aur.archlinux.org/osync.git osync.aur &&
|
2016-09-10 09:25:11 +00:00
|
|
|
cd "osync.aur" &&
|
2016-09-10 10:35:54 +00:00
|
|
|
srcdir="." &&
|
|
|
|
source "PKGBUILD" &&
|
2016-11-11 22:44:17 +00:00
|
|
|
|
2016-09-10 10:35:54 +00:00
|
|
|
url=$(echo -n ${source[0]} | sed 's/git+//g' | sed 's/#.*//g') &&
|
|
|
|
branch=$(echo -n ${source[0]} | sed 's/.*#branch=//g') &&
|
|
|
|
git clone -b $branch $url &&
|
2016-11-12 13:36:59 +00:00
|
|
|
|
|
|
|
# Get pkgver from current osync
|
|
|
|
pkgver=$(grep PROGRAM_VERSION= ./osync/osync.sh)
|
|
|
|
pkgver=${pkgver##*=}
|
|
|
|
echo $pkgver
|
|
|
|
|
2016-09-10 10:35:54 +00:00
|
|
|
sed -i "s/pkgver=.*/pkgver=$(pkgver)/g" "PKGBUILD" &&
|
2016-09-10 09:25:11 +00:00
|
|
|
../mksrcinfo &&
|
2016-09-10 10:35:54 +00:00
|
|
|
rm -rf "osync" &&
|
|
|
|
git add . &&
|
|
|
|
git commit -m "Updated version" &&
|
2016-09-10 09:25:11 +00:00
|
|
|
git push origin master &&
|
|
|
|
cd .. &&
|
|
|
|
rm -rf "osync.aur" &&
|
|
|
|
echo "Package updated successfully"
|