aur/nexus-oss/update.sh

21 lines
525 B
Bash
Raw Normal View History

2021-05-19 09:31:28 +02:00
#!/bin/sh
ver=`curl -s --head https://download.sonatype.com/nexus/3/latest-unix.tar.gz | grep location | cut -d' ' -f2`
ver=${ver%-unix*}
ver=${ver##*nexus-}
echo $ver
array=(${ver//-/ })
sed -i "s/_version=.*/_version=${array[0]}/" PKGBUILD
sed -i "s/_patch=.*/_patch=${array[1]}/" PKGBUILD
updpkgsums > /dev/null 2>&1
if [ $? -eq 0 ]
then
2021-07-26 20:10:11 +02:00
makepkg --printsrcinfo > .SRCINFO
2021-05-19 09:31:28 +02:00
git add .SRCINFO PKGBUILD
2021-07-26 20:10:11 +02:00
git commit -m "nexus: update to $ver" > /dev/null 2>&1
2021-05-19 09:31:28 +02:00
if [ $? -eq 0 ]
then
git push
fi
fi