make update function global
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
419ed1cdc9
commit
2870157c78
@ -1,5 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
source ../.util.sh
|
||||||
|
|
||||||
ver=`curl -s --head https://download.sonatype.com/nexus/3/latest-unix.tar.gz | grep location | cut -d' ' -f2`
|
ver=`curl -s --head https://download.sonatype.com/nexus/3/latest-unix.tar.gz | grep location | cut -d' ' -f2`
|
||||||
ver=${ver%-unix*}
|
ver=${ver%-unix*}
|
||||||
ver=${ver##*nexus-}
|
ver=${ver##*nexus-}
|
||||||
@ -7,14 +9,5 @@ echo $ver
|
|||||||
array=(${ver//-/ })
|
array=(${ver//-/ })
|
||||||
sed -i "s/_version=.*/_version=${array[0]}/" PKGBUILD
|
sed -i "s/_version=.*/_version=${array[0]}/" PKGBUILD
|
||||||
sed -i "s/_patch=.*/_patch=${array[1]}/" PKGBUILD
|
sed -i "s/_patch=.*/_patch=${array[1]}/" PKGBUILD
|
||||||
updpkgsums > /dev/null 2>&1
|
|
||||||
if [ $? -eq 0 ]
|
update_pkg
|
||||||
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
|
|
||||||
|
Loading…
Reference in New Issue
Block a user