summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2018-07-27 19:44:31 +0100
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2018-07-27 19:44:31 +0100
commit7047151a681dee832dcb50513295b790fc8edd01 (patch)
tree5149ccaa39a748a26a2c7b662f4108cb89bedf06
parenta18d618dd0ad2ee28a2108f53ee1743380c1a08d (diff)
downloaddraklive-config-7047151a681dee832dcb50513295b790fc8edd01.tar
draklive-config-7047151a681dee832dcb50513295b790fc8edd01.tar.gz
draklive-config-7047151a681dee832dcb50513295b790fc8edd01.tar.bz2
draklive-config-7047151a681dee832dcb50513295b790fc8edd01.tar.xz
draklive-config-7047151a681dee832dcb50513295b790fc8edd01.zip
Use ls -t to find latest version of packages for local repo.
ls -v doesn't sort correctly when a subrel has been added in later versions.
-rwxr-xr-xfiles/mga_rpms/update_media.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/files/mga_rpms/update_media.sh b/files/mga_rpms/update_media.sh
index f742b66..8aa012c 100755
--- a/files/mga_rpms/update_media.sh
+++ b/files/mga_rpms/update_media.sh
@@ -17,7 +17,7 @@ copy_latest()
if [ $arch = "i586" ] ; then
name=${name/-desktop-/-desktop586-}
fi
- path=`ls -1v $bcdmedia/$arch/media/$repo/{release,updates}/$name.rpm 2> /dev/null | tail -1`
+ path=`ls -1t $bcdmedia/$arch/media/$repo/{release,updates}/$name.rpm 2> /dev/null | head -1`
if [ -z $path ] ; then
echo "Couldn't find $name for $arch"
exit 1