#!/bin/bash SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) make_folder () { rm -rf ./tmp mkdir ./tmp } install_oneget() { go install github.com/v8platform/oneget@latest export PATH=$PATH:"~/go/bin" } download_1c_distr() { oneget get --path $1 platform:linux.x64@latest } find_1c_distr() { find $1 -name "server64*.tar.gz" -type f } cleanup() { rm -rf ./tmp } pushd $SCRIPT_DIR # import # ONEC_USERNAME # ONEC_PASSWORD ENV_FILE="../portal-1c.env" if [[ -r "$ENV_FILE" ]] then . $ENV_FILE else echo "no env vars file" popd exit 1 fi make_folder oneget get --path ./tmp platform:win.full.x64 #oneget get --path ./tmp platform:win.full@latest #cleanup popd