aur/nexus-oss/update.sh
nyyu c3274b9469
All checks were successful
continuous-integration/drone/push Build is passing
nexus: update script
2021-07-26 20:10:14 +02:00

21 lines
525 B
Bash
Executable File

#!/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
makepkg --printsrcinfo > .SRCINFO
git add .SRCINFO PKGBUILD
git commit -m "nexus: update to $ver" > /dev/null 2>&1
if [ $? -eq 0 ]
then
git push
fi
fi