#!/usr/bin/env bash

. .config.sh

#aa_lib_echo "Downloading and installing Shopware Default Theme from current Repository";
#
#git clone --depth=1 --branch $SWVersion https://github.com/shopware/shopware.git ./.tempfolder
#
#
#
#cp -rf ./.tempfolder/themes ./
#rm -fr ./.tempfolder


aa_lib_echo "Trying to get Plugins, please see /web/cache/*.less which ones are required"

mkdir -p ./engine/Shopware/Plugins/Community/Frontend/NetzpEvents/Views/_public/src/less
mkdir -p ./engine/Shopware/Plugins/Default/Frontend/AdvancedMenu/Views/frontend/_public/src/less
mkdir -p ./engine/Shopware/Plugins/Community/Frontend/PixInquiry/Views/frontend/_public/src/less


sftp $SFTPHOST <<EOF
 cd $WWWROOT
 get -r ./engine/Shopware/Plugins/Community/Frontend/NetzpEvents/Views/_public/src/less/* ./engine/Shopware/Plugins/Community/Frontend/NetzpEvents/Views/_public/src/less/
 get -r ./engine/Shopware/Plugins/Default/Frontend/AdvancedMenu/Views/frontend/_public/src/less/* ./engine/Shopware/Plugins/Default/Frontend/AdvancedMenu/Views/frontend/_public/src/less/
 get -r ./engine/Shopware/Plugins/Community/Frontend/PixInquiry//Views/frontend/_public/src/less/* ./engine/Shopware/Plugins/Community/Frontend/PixInquiry//Views/frontend/_public/src/less/
EOF
