#!/bin/bash : ' @vendor Chorke Academia, Inc. @web https://cdn.chorke.org/docs/academia @version 1.0.00 @since 1.0.00 ' :<> \033[0;32m$SDK_DIR\033[0m\n" curl $SDK_URL --progress-bar> $SDK_DIR/$SDK_ZIP unzip -q $SDK_DIR/$SDK_ZIP -d $SDK_DIR rm -rf $SDK_DIR/$SDK_ZIP else printf "\nCURL \033[0;31mNot Found! \033[0m:(\n" fi fi } function install(){ if [ -f 'app.json' ]&&[ -f 'workspace.json' ]&&[ ! -d 'ext' ];then download sencha app install $SDK_EXT fi } function deploy(){ if [ -f 'app.json' ]&&[ -f 'workspace.json' ]&&[ -d 'ext' ];then sencha app build --clean --pro pro='target/production' if [ -d "$pro" ];then cd $pro;rm -rf $zip;mv $app $dir zip -qr $zip $dir;rm -rf $dir cd ../..; fi if [ -f "$pro/$zip" ];then scp $pro/$zip $aut:~ fi else init fi } function init(){ if [ -x "$(command -v sencha)" ];then if [ -f 'app.json' ]&&[ -f 'workspace.json' ]&&[ ! -d 'ext' ];then download install fi if [ -f 'app.json' ]&&[ -f 'workspace.json' ]&&[ -d 'ext' ];then printf "\nSencha SDK \033[0;32mFound! \033[0m:)\n" deploy else printf "\nSencha SDK \033[0;31mNot Found! \033[0m:(\n" fi else printf "\nSencha CMD \033[0;31mNot Found! \033[0m:(\n" fi } # ssh execute bash in remote init;ssh $aut 'bash -s' cat<