Browse Source

AbraFlexi commandline downloader added

ease-core-based
Vítězslav Dvořák 11 months ago
parent
commit
6c6e8e6541
  1. 2
      README.md
  2. 37
      bin/abraflexiget
  3. 2
      debian/control

2
README.md

@ -114,7 +114,7 @@ Configuration file example
"ABRAFLEXI_COMPANY": "demo"
}
```
Default config file location is /etc/abraflexi/client.json ( also provided by [php-abraflexi-config](https://github.com/VitexSoftware/php-abraflexi-config) debian package )
Default config file location is /etc/abraflexi/client.json ( also provided by [abraflexi-client-config](https://github.com/VitexSoftware/abraflexi-client-config) debian package )
WebHooks Wipe
-------------

37
bin/abraflexiget

@ -0,0 +1,37 @@
#!/bin/sh
if [ -z $1 ]; then
echo "Usage: $0 client|server [version]" >&2
exit 1
fi
EDITION=$1
VERSION=$2
if [ -z ${VERSION} ]; then
LATESTURL=`curl -s -q https://www.flexibee.eu/podpora/stazeni-flexibee/stazeni-ekonomickeho-systemu-flexibee-linux/ | grep _all.deb | awk -F'"' '{print $2}' | head -n 1`
LATESTPKG=`basename $LATESTURL`
VERSION=`echo $LATESTPKG | awk -F_ '{print $2}'`
fi
YEAR=`echo ${VERSION}|awk -F. '{print \$1}'`
VER=`echo ${VERSION}|awk -F. '{print \$2}'`
REV=`echo ${VERSION}|awk -F. '{print \$3}'`
if [ ${EDITION} = "client" ]; then
PACKNAME="flexibee-client"
else
PACKNAME="flexibee"
fi
PACKAGE="${PACKNAME}_${VERSION}_all.deb"
if [ -z ${REV} ]; then
DWLURL="https://download.flexibee.eu/download/${YEAR}.${VER}/${YEAR}.${VER}/${PACKAGE}"
else
DWLURL="https://download.flexibee.eu/download/${YEAR}.${VER}/${YEAR}.${VER}.${REV}/${PACKAGE}"
fi
wget -c $DWLURL -O ${PACKAGE}

2
debian/control vendored

@ -9,7 +9,7 @@ Section: development
Package: abraflexi-tools
Depends: ${misc:Depends},composer, php-cli, php-spojenet-abraflexi-dev
Suggests: abraflexi-server,php-abraflexi-config
Suggests: abraflexi-server,abraflexi-client-config
Replaces: abraflexi-testing-tools
Architecture: all
Section: devel

Loading…
Cancel
Save