|
|
@ -20,16 +20,34 @@ |
|
|
|
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
|
|
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
|
|
|
|
|
|
VIMBRANCH=7.4 |
|
|
|
VIMBRANCH=8.1 |
|
|
|
CTAGSVER=5.8 |
|
|
|
BUILD=${BUILD:-1} |
|
|
|
|
|
|
|
CWD=$(pwd) |
|
|
|
|
|
|
|
if [ "$1" = "check" ]; then |
|
|
|
VERSION=$(echo vim-${VIMBRANCH}*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev) |
|
|
|
NEWVERSION="$(echo $(basename $(wget -q -O - https://github.com/vim/vim/releases | grep -F v${VIMBRANCH} | head -n 1 | cut -f 2 -d \" )) | cut -b2- )" |
|
|
|
|
|
|
|
if [ ! "$NEWVERSION" ]; then |
|
|
|
echo "Failed to fetch latest version" |
|
|
|
exit |
|
|
|
fi |
|
|
|
|
|
|
|
if [ "$VERSION" != "$NEWVERSION" ]; then |
|
|
|
echo "New version available: $NEWVERSION" |
|
|
|
exit |
|
|
|
fi |
|
|
|
|
|
|
|
echo "No updates available" |
|
|
|
exit |
|
|
|
fi |
|
|
|
|
|
|
|
if [ -r vim-${VIMBRANCH}*.tar.xz ]; then # if there's a source archive already, use the version number from it: |
|
|
|
VERSION=$(echo vim-${VIMBRANCH}*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev) |
|
|
|
else # need to fetch the latest source archive for this branch: |
|
|
|
VERSION="$(echo $(basename $(wget -q -O - https://github.com/vim/vim/releases | grep v${VIMBRANCH} | head -n 1 | cut -f 2 -d \" )) | cut -b2- )" |
|
|
|
VERSION="$(echo $(basename $(wget -q -O - https://github.com/vim/vim/releases | grep -F v${VIMBRANCH} | head -n 1 | cut -f 2 -d \" )) | cut -b2- )" |
|
|
|
( lftpget https://github.com/vim/vim/archive/v${VERSION}.tar.gz |
|
|
|
gzip -d v${VERSION}.tar.gz |
|
|
|
mv v${VERSION}.tar vim-${VERSION}.tar |
|
|
|