#!/bin/bash
Webmin=$(grep "Webmin=" ../build_cube.sh  | cut -d '"' -f 2)
if [ ! -d temp ]; then
mkdir temp
fi
cd temp

function download_copy {
FILE=/home/wareck/Build_Cube/pack/$box
if [ ! -f "$FILE" ]; then
wget -c -q --show-progress http://folivier.homelinux.org/cube/pack/$box
cp $box /home/wareck/Build_Cube/pack/$box
fi
}

box=cgminer.conf
download_copy

box=chia-miner.tar.xz
download_copy

box=gerbera.tar.xz
download_copy

box=start_cgminer.tar.xz
download_copy

box=$Webmin.tar.xz
download_copy

box=xmrig.tar.xz
download_copy

box=zfsmanager-0.0.4.wbm.gz
download_copy

#box=amdgpu-install_22.10.2.50102-1_all.deb
#download_copy

box=amdgpu-install_22.20.50200-1_all.deb
download_copy

box=linux-firmware.tar.xz
download_copy

box=gpu-miners.tar.xz
download_copy

cd ..
rm -r -f temp

echo -e "finish."
