Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # File: Frontear
- # Variables del script
- _hoy=$(date +"%m_%d_%Y_%r_%S")
- _pwd=$(pwd)
- _permisos=$(ls -la *)
- # destino=$_pwd/build/bundel.js
- # origen=$_pwd/animejs/app-main.js
- CFG_FILE=$_pwd/config.ini
- $fileconfig=$CFG_FILE
- crear_config(){
- echo '
- origen='$_pwd'/animejs/app-main.js
- destino='$_pwd'/build/bundel.js
- ' > $fileconfig
- }
- check_config() {
- if [ ! -e "$fileconfig" ];
- then
- echo "File '$fileconfig' does not exist"
- echo "Al parecer no existe este archivo"
- echo "El archivo '$fileconfig' no existe". " [ ".$_hoy." ]" >> $logger
- crear_config
- echo "configdata deploy work created". "[".$_hoy."]"
- else
- echo "Data is exist in '$fileconfig' folder". " [ ".$_hoy." ]"
- echo "Data '$fileconfig' deploy is existed OK ". " [ "$_hoy" ]" >> $logger
- echo 'Listo todo esta instalado y listo para desplegar'
- fi
- }
- check_config
- preparar_config(){
- ORIGEN=$(awk -F "=" '/origen/ {print $2}' "$CFG_FILE")
- DESTINO=$(awk -F "=" '/destino/ {print $2}' "$CFG_FILE")
- echo "Che! este es tu Servidor: "$ORIGEN""
- echo "Aquí esta tu Puerto: "$DESTINO""
- }
- preparar_config
- # Agregada una decoración que me gusta mucho:
- PrintLogData(){
- cat <<EOF
- ✔ Esto es una herramienta de despliegue
- ✔ Su version primitiva esta diseñada
- para brindar apoyo a desempaquetar
- Webpack en su computadora.
- Requisitos:
- 🛃 NPM instalado
- 🛃 NODE JS instalado
- ❗ En caso de no disponer por favor instala
- esos complementos en el sistema y
- reintentalo
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
- ░░████░████░███████░░░░░░░░░░░░░░░░░░░░░
- ░░█▒░█░█░░█░█░░█░░█░░░░░░░░░░░░░░░░░░░░░
- ░░█░░█▒████░█░░█░░█░░░░░░░░░░░░░░░░░░░░░
- ░░░░░░░█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
- Author : Villalba Juan Manuel Pedro
- Email : soporte@hexomedesarrollos.com
- Horarios: De 14 pm to 20pm Sat to Sun
- Website : www.hexomedesarrollos.com
- EOF;
- }
- PrintLogData()
- echo 'webpack '.$origien' .'$destino' -p' > production.sh
- echo ''webpack '.$origien' .'$destino' -d' > desarrollo.sh
- echo 'webpack-dev-server' >> desarrollo.sh
- chmod +x $_pwd/desarrollos.sh
- sh $_pwd/desarrollos.sh
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement