Answer the question
In order to leave comments, you need to log in
How to organize a repository with the latest software versions?
Hello.
There is a task of the following nature: the company periodically releases motley software (let's call it that): scripts, packages, just binaries, and so on. I would like to be able to get the latest version of the software from a single place, like this:
where packagename-latest is a link to the latest version of packagename . Naturally, I would not want to edit the link after each release, it should change automatically.
How best to organize all these Wishlist? Maybe there is free software that solves this problem? wget "http://ip_address/packagename-latest"
Answer the question
In order to leave comments, you need to log in
Dimitri, thanks for the reply!
As a result, in order to save time, I made the simplest option that suited me: I installed proftpd and added a script task to crontab that runs every minute:
PACKAGES=$(find /ftp/* -type d -not -name 'lost+found')
for PACKAGE in ${PACKAGES[@]}; do
echo $(ls -I 'latest' -Atp $PACKAGE | grep -v '/' | head -n 1) > $PACKAGE/latest
done
# Через curl получаем название файла, являющегося последним добавленным в директории, и скачиваем его через wget
wget ftp://${FTP_SRV}/${PKG_NAME}/$(curl -s ftp://${FTP_SRV}/${PKG_NAME}/latest)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question