2
0
mirror of https://github.com/deajan/osync synced 2024-11-17 09:25:42 +00:00
osync/packaging/ARCH/update-osync-pkg.sh

26 lines
631 B
Bash
Raw Normal View History

#!/bin/bash
2016-09-10 10:35:54 +00:00
git clone git+ssh://aur@aur.archlinux.org/osync.git osync.aur &&
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" &&
../mksrcinfo &&
2016-09-10 10:35:54 +00:00
rm -rf "osync" &&
git add . &&
git commit -m "Updated version" &&
git push origin master &&
cd .. &&
rm -rf "osync.aur" &&
echo "Package updated successfully"