Commit 0fa4503b authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm play: improve winbox dowloading

parent d6098a2b
......@@ -13,7 +13,7 @@ erc $TAR || fatal
mv WinBox_Linux/* opt/$PRODUCT
VERSION=$(echo "$URL" | awk -F'/' '{print $6}')
[ -n "$VERSION" ] || VERSION=$(echo "$URL" | awk -F'/' '{print $6}')
[ -n "$VERSION" ] || fatal "Can't get package version"
PKGNAME=$PRODUCT-$VERSION
......
......@@ -9,8 +9,9 @@ URL="https://mikrotik.com/download"
. $(dirname $0)/common.sh
if [ "$VERSION" = "*" ] ; then
VERSION=$(eget -O- https://mikrotik.com/download | grep WinBox_Linux.zip | awk -F'/' '{print $6}' | head -n1)
PKGURL=$(eget --list https://mikrotik.com/download WinBox_Linux.zip)
else
PKGURL="https://download.mikrotik.com/routeros/winbox/$VERSION/WinBox_Linux.zip"
fi
PKGURL="https://download.mikrotik.com/routeros/winbox/$VERSION/WinBox_Linux.zip"
install_pack_pkgurl
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment