WeBash Logotype updated
This commit is contained in:
parent
f2105f8347
commit
ec24e72e9f
6 changed files with 544 additions and 8 deletions
|
@ -1,4 +1,4 @@
|
||||||
# WeBash-Logo
|
# WeBash Logo
|
||||||
|
|
||||||
Une collection de logotypes pour le projet [*WeBash*](https://github.com/taokann/WeBash "Source du projet WeBash").
|
Une collection de logotypes pour le projet [*WeBash*](https://github.com/taokann/WeBash "Source du projet WeBash").
|
||||||
|
|
||||||
|
|
138
WeBashCLI/start.sh
Normal file
138
WeBashCLI/start.sh
Normal file
|
@ -0,0 +1,138 @@
|
||||||
|
#
|
||||||
|
# File name: start.sh
|
||||||
|
# Description: Bash script to easily start the docker container
|
||||||
|
# Authors: colivier74
|
||||||
|
# If you're a new WeBash contributor and worked on this file, please add your name here.
|
||||||
|
#
|
||||||
|
# This file is part of the WeBash project with is released under the terms of GNU Affero General Public License V3.0.
|
||||||
|
# You should have received a copy of the GNU Affero General Public License along with WeBash. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
#!/bin/bash
|
||||||
|
DIRECTORY=$(cd `dirname $0` && pwd)
|
||||||
|
GIT=$(type -p git)
|
||||||
|
|
||||||
|
if [ -z $GIT ]; then
|
||||||
|
echo "WeBash needs git to work, please install it."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#REMOVE OLDS FILES
|
||||||
|
#docker
|
||||||
|
rm $DIRECTORY/docker-compose.yml > /dev/null 2>&1
|
||||||
|
rm $DIRECTORY/Dockerfile > /dev/null 2>&1
|
||||||
|
rm $DIRECTORY/.env > /dev/null 2>&1
|
||||||
|
#node
|
||||||
|
rm $DIRECTORY/npmout.txt > /dev/null 2>&1
|
||||||
|
rm $DIRECTORY/npmerr.txt > /dev/null 2>&1
|
||||||
|
|
||||||
|
#UPDATE
|
||||||
|
$GIT -C $DIRECTORY pull
|
||||||
|
# MAN-DB-TXT
|
||||||
|
$GIT clone https://github.com/colivier74/man-db-txt.git res/git-libs/man-db-txt
|
||||||
|
$GIT -C res/git-libs/man-db-txt pull
|
||||||
|
|
||||||
|
if [ -z $1 ]; then
|
||||||
|
echo "Please specify a way to start Webash"
|
||||||
|
echo "Usage : bash start.sh <way> [args ...]"
|
||||||
|
echo ""
|
||||||
|
echo "way : docker"
|
||||||
|
echo "args : -p <port>"
|
||||||
|
echo " -n <name>"
|
||||||
|
echo ""
|
||||||
|
echo "way : node"
|
||||||
|
echo "args : -p <port>"
|
||||||
|
#DOCKER
|
||||||
|
elif [ $1 = docker ]; then
|
||||||
|
#check for dependencies
|
||||||
|
DOCKER_COMPOSE=$(type -p docker-compose)
|
||||||
|
DOCKER=$(type -p docker)
|
||||||
|
if [ -z $DOCKER ]; then
|
||||||
|
echo "WeBash needs docker to work, please install it."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z $DOCKER_COMPOSE ]; then
|
||||||
|
echo "WeBash needs docker-compose to work, please install it."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#copy files
|
||||||
|
cp $DIRECTORY/deployment/docker/docker-compose_pattern.yml $DIRECTORY/docker-compose.yml > /dev/null 2>&1
|
||||||
|
cp $DIRECTORY/deployment/docker/Dockerfile_pattern $DIRECTORY/Dockerfile > /dev/null 2>&1
|
||||||
|
|
||||||
|
while [ -n "$1" ]; do
|
||||||
|
case $1 in
|
||||||
|
-p|--port) PORT=$2; shift;;
|
||||||
|
-n|--name) NAME=$2; shift;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z $PORT ]; then
|
||||||
|
PORT="8085"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z $NAME ]; then
|
||||||
|
NAME="webash"
|
||||||
|
fi
|
||||||
|
|
||||||
|
touch $DIRECTORY/.env
|
||||||
|
echo "PORT=$PORT" >> $DIRECTORY/.env
|
||||||
|
echo "NAME=$NAME" >> $DIRECTORY/.env
|
||||||
|
|
||||||
|
#run container
|
||||||
|
$DOCKER_COMPOSE -f $DIRECTORY/docker-compose.yml up --build -d > /dev/null 2>&1
|
||||||
|
|
||||||
|
echo "------------"
|
||||||
|
echo "WeBash was successfully started with docker and the following parameters:"
|
||||||
|
echo "port :" $PORT
|
||||||
|
echo "container name:" $NAME
|
||||||
|
echo "------------"
|
||||||
|
elif [ $1 = node ]; then
|
||||||
|
#check for dependencies
|
||||||
|
NODE=$(type -p node)
|
||||||
|
NPM=$(type -p npm)
|
||||||
|
if [ -z $NODE ]; then
|
||||||
|
echo "WeBash needs node.js to work, please install it."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z $NPM ]; then
|
||||||
|
echo "WeBash needs npm to work, please install it."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#Install dependencies npm
|
||||||
|
$NPM install
|
||||||
|
|
||||||
|
while [ -n "$1" ]; do
|
||||||
|
case $1 in
|
||||||
|
-p|--port) PORT=$2; shift;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z $PORT ]; then
|
||||||
|
PORT="8085"
|
||||||
|
fi
|
||||||
|
|
||||||
|
touch $DIRECTORY/.env
|
||||||
|
echo "PORT=$PORT" >> $DIRECTORY/.env
|
||||||
|
|
||||||
|
#run container
|
||||||
|
$NPM start > $DIRECTORY/npmout.txt 2> $DIRECTORY/npmerr.txt &
|
||||||
|
|
||||||
|
echo "------------"
|
||||||
|
echo "WeBash was successfully started with node.js and the following parameters:"
|
||||||
|
echo "port :" $PORT
|
||||||
|
echo "------------"
|
||||||
|
else
|
||||||
|
echo "Unknown way"
|
||||||
|
echo "Here are the means available :"
|
||||||
|
echo "docker"
|
||||||
|
echo "node"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#You can add a crontab for this script for update your server automatically (change the path with your's)
|
||||||
|
#* * * * * /bin/sh /home/chevro/WeBash/start.sh
|
81
WeBashCLI/stop.sh
Normal file
81
WeBashCLI/stop.sh
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
#
|
||||||
|
# File name: stop.sh
|
||||||
|
# Description: Bash script to easily stop the docker container
|
||||||
|
# Authors: colivier74
|
||||||
|
# If you're a new WeBash contributor and worked on this file, please add your name here.
|
||||||
|
#
|
||||||
|
# This file is part of the WeBash project with is released under the terms of GNU Affero General Public License V3.0.
|
||||||
|
# You should have received a copy of the GNU Affero General Public License along with WeBash. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
#!/bin/bash
|
||||||
|
DIRECTORY=$(cd `dirname $0` && pwd)
|
||||||
|
|
||||||
|
if [ -z $1 ]; then
|
||||||
|
echo "Please specify how you started Webash"
|
||||||
|
echo "Usage : bash stop.sh <way>"
|
||||||
|
echo "ways : docker"
|
||||||
|
echo " node"
|
||||||
|
#DOCKER
|
||||||
|
elif [ $1 = docker ]; then
|
||||||
|
#check for dependencies
|
||||||
|
DOCKER_COMPOSE=$(type -p docker-compose)
|
||||||
|
DOCKER=$(type -p docker)
|
||||||
|
if [ -z $DOCKER ]; then
|
||||||
|
echo "WeBash needs docker to work, please install it."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z $DOCKER_COMPOSE ]; then
|
||||||
|
echo "WeBash needs docker-compose to work, please install it."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#stop container
|
||||||
|
if [ ! -f $DIRECTORY/docker-compose.yml ]; then
|
||||||
|
echo "Container already stopped !"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
$DOCKER_COMPOSE -f $DIRECTORY/docker-compose.yml down --remove-orphans
|
||||||
|
fi
|
||||||
|
|
||||||
|
#removes files
|
||||||
|
rm $DIRECTORY/docker-compose.yml > /dev/null 2>&1
|
||||||
|
rm $DIRECTORY/Dockerfile > /dev/null 2>&1
|
||||||
|
#node
|
||||||
|
elif [ $1 = node ]; then
|
||||||
|
#check for dependencies
|
||||||
|
NODE=$(type -p node)
|
||||||
|
NPM=$(type -p npm)
|
||||||
|
if [ -z $NODE ]; then
|
||||||
|
echo "WeBash needs node.js to work, please install it."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z $NPM ]; then
|
||||||
|
echo "WeBash needs npm to work, please install it."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#stop npm
|
||||||
|
if [ ! -f $DIRECTORY/npmout.txt ]; then
|
||||||
|
echo "Node already stopped !"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
killall -SIGINT WeBash
|
||||||
|
fi
|
||||||
|
|
||||||
|
#removes files
|
||||||
|
rm $DIRECTORY/npmout.txt > /dev/null 2>&1
|
||||||
|
rm $DIRECTORY/npmerr.txt > /dev/null 2>&1
|
||||||
|
|
||||||
|
######################FILES FOR EVERY WAYS
|
||||||
|
#removes files
|
||||||
|
rm $DIRECTORY/.env > /dev/null 2>&1
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "Unknown way"
|
||||||
|
echo "Here are the means available :"
|
||||||
|
echo "docker"
|
||||||
|
echo "node"
|
||||||
|
fi
|
317
WeBashCLI/webash.sh
Normal file
317
WeBashCLI/webash.sh
Normal file
|
@ -0,0 +1,317 @@
|
||||||
|
#
|
||||||
|
# File name: webash.sh
|
||||||
|
# Description: Bash script to easily start and stop the docker container
|
||||||
|
# Authors: colivier74, Alnotz
|
||||||
|
# If you're a new WeBash contributor and worked on this file, please add your name here.
|
||||||
|
#
|
||||||
|
# This file is part of the WeBash project with is released under the terms of GNU Affero General Public License V3.0.
|
||||||
|
# You should have received a copy of the GNU Affero General Public License along with WeBash. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
#!/bin/bash
|
||||||
|
DIRECTORY=$(cd `dirname $0` && pwd)
|
||||||
|
GIT=$(type -p git)
|
||||||
|
VERBOSE=0
|
||||||
|
|
||||||
|
if [ -z $GIT ]; then
|
||||||
|
echo "WeBash needs git to work, please install it."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#REMOVE OLDS FILES
|
||||||
|
#docker
|
||||||
|
rm $DIRECTORY/docker-compose.yml > /dev/null 2>&1
|
||||||
|
rm $DIRECTORY/Dockerfile > /dev/null 2>&1
|
||||||
|
rm $DIRECTORY/.env > /dev/null 2>&1
|
||||||
|
#node
|
||||||
|
rm $DIRECTORY/npmout.txt > /dev/null 2>&1
|
||||||
|
rm $DIRECTORY/npmerr.txt > /dev/null 2>&1
|
||||||
|
|
||||||
|
#UPDATE
|
||||||
|
$GIT -C $DIRECTORY pull
|
||||||
|
# MAN-DB-TXT
|
||||||
|
$GIT clone https://github.com/colivier74/man-db-txt.git res/git-libs/man-db-txt
|
||||||
|
$GIT -C res/git-libs/man-db-txt pull
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
#Command for help text.
|
||||||
|
help )
|
||||||
|
case $LANG in
|
||||||
|
#Translated in French.
|
||||||
|
fr* )
|
||||||
|
echo "Usage : webash [-v] { help | start WAY [-p IP] [-n NAME] | stop WAY }"
|
||||||
|
echo ""
|
||||||
|
echo "Argument général"
|
||||||
|
echo ""
|
||||||
|
echo "-v | --verbose"
|
||||||
|
echo " Rend plus bavard."
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo "Commandes"
|
||||||
|
echo ""
|
||||||
|
echo "help"
|
||||||
|
echo " Affiche cette sortie d'aide."
|
||||||
|
echo ""
|
||||||
|
echo "start WAY"
|
||||||
|
echo " Démarre l'émulation WeBash via la méthode WAY."
|
||||||
|
echo " On peut préciser le port TCP/UDP PORT via l'argument -p"
|
||||||
|
echo " et préciser le nom du conteneur NAME via l'argument -n."
|
||||||
|
echo ""
|
||||||
|
echo "stop WAY"
|
||||||
|
echo " Démarre l'émulation WeBash via la méthode WAY."
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo "Arguments spécifiques"
|
||||||
|
echo ""
|
||||||
|
echo "-p | --port=PORT"
|
||||||
|
echo " Insère un port TCP/UDP personnalisé PORT. La valeur par"
|
||||||
|
echo " défaut de PORT est 8085."
|
||||||
|
echo ""
|
||||||
|
echo "-n | --name=NAME"
|
||||||
|
echo " Insère un nom de conteneur NAME. La valeur par défaut"
|
||||||
|
echo " de NAME est \"webash\"."
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo "Variables"
|
||||||
|
echo ""
|
||||||
|
echo "WAY"
|
||||||
|
echo " Nom de méthode pour l'implémentation de WeBash. Les"
|
||||||
|
echo " valeurs légales sont \"docker\" et \"node\"."
|
||||||
|
echo ""
|
||||||
|
echo "Version : 1.0"
|
||||||
|
echo ""
|
||||||
|
echo "Source : https://github.com/taokann/WeBash"
|
||||||
|
echo ""
|
||||||
|
echo "Auteurs : Tao-Kann MARTIN et Olivier CARTIER"
|
||||||
|
echo ""
|
||||||
|
echo "Licence : GNU Affero General Public License V3.0"
|
||||||
|
echo ""
|
||||||
|
;;
|
||||||
|
#English as default language.
|
||||||
|
* )
|
||||||
|
echo "Usage : webash [-v] { help | start WAY [-i IP] [-n NAME] | stop WAY }"
|
||||||
|
echo ""
|
||||||
|
echo "General argument"
|
||||||
|
echo ""
|
||||||
|
echo "-v | --verbose"
|
||||||
|
echo " Gives more verbosity."
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo "Commands"
|
||||||
|
echo ""
|
||||||
|
echo "help"
|
||||||
|
echo " Show this help output."
|
||||||
|
echo ""
|
||||||
|
echo "start"
|
||||||
|
echo " Starts the WeBash emulation via WAY method."
|
||||||
|
echo " One can precise the TCP/UDP port PORT via -p argument"
|
||||||
|
echo " and precise the container name NAME via -n argument."
|
||||||
|
echo ""
|
||||||
|
echo "stop WAY"
|
||||||
|
echo " Stops the WeBash emulation via WAY method."
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo "Specific arguments"
|
||||||
|
echo ""
|
||||||
|
echo "-p | --port=PORT"
|
||||||
|
echo " Set customized TCP/UDP port PORT. PORT's default value"
|
||||||
|
echo " is 8085."
|
||||||
|
echo ""
|
||||||
|
echo "-n | --name=NAME"
|
||||||
|
echo " Set customized container name NAME. NAME's default"
|
||||||
|
echo " value is \"webash\"."
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
echo "Variables"
|
||||||
|
echo ""
|
||||||
|
echo "WAY"
|
||||||
|
echo " Method name for WeBash implementation. Legal"
|
||||||
|
echo " values are \"docker\" and \"node\"."
|
||||||
|
echo ""
|
||||||
|
echo "Version : 1.0"
|
||||||
|
echo ""
|
||||||
|
echo "Source : https://github.com/taokann/WeBash"
|
||||||
|
echo ""
|
||||||
|
echo "Authors : Tao-Kann MARTIN and Olivier CARTIER"
|
||||||
|
echo ""
|
||||||
|
echo "Licence : GNU Affero General Public License V3.0"
|
||||||
|
echo ""
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
exit 0;;
|
||||||
|
#Global argument for verbosity in console.
|
||||||
|
-v | --verbose )
|
||||||
|
VERBOSE=1
|
||||||
|
shift;;
|
||||||
|
#Commande to start WeBash.
|
||||||
|
start )
|
||||||
|
if [ -z $1 ]; then
|
||||||
|
echo "Please specify a way to start Webash"
|
||||||
|
echo "Usage : bash start.sh <way> [args ...]"
|
||||||
|
echo ""
|
||||||
|
echo "way : docker"
|
||||||
|
echo "args : -p <port>"
|
||||||
|
echo " -n <name>"
|
||||||
|
echo ""
|
||||||
|
echo "way : node"
|
||||||
|
echo "args : -p <port>"
|
||||||
|
#DOCKER
|
||||||
|
elif [ $1 = docker ]; then
|
||||||
|
#check for dependencies
|
||||||
|
DOCKER_COMPOSE=$(type -p docker-compose)
|
||||||
|
DOCKER=$(type -p docker)
|
||||||
|
if [ -z $DOCKER ]; then
|
||||||
|
echo "WeBash needs docker to work, please install it."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z $DOCKER_COMPOSE ]; then
|
||||||
|
echo "WeBash needs docker-compose to work, please install it."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#copy files
|
||||||
|
cp $DIRECTORY/deployment/docker/docker-compose_pattern.yml $DIRECTORY/docker-compose.yml > /dev/null 2>&1
|
||||||
|
cp $DIRECTORY/deployment/docker/Dockerfile_pattern $DIRECTORY/Dockerfile > /dev/null 2>&1
|
||||||
|
|
||||||
|
while [ -n "$1" ]; do
|
||||||
|
case $2 in
|
||||||
|
-p|--port) PORT=$2; shift;;
|
||||||
|
-n|--name) NAME=$2; shift;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z $PORT ]; then
|
||||||
|
PORT="8085"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z $NAME ]; then
|
||||||
|
NAME="webash"
|
||||||
|
fi
|
||||||
|
|
||||||
|
touch $DIRECTORY/.env
|
||||||
|
echo "PORT=$PORT" >> $DIRECTORY/.env
|
||||||
|
echo "NAME=$NAME" >> $DIRECTORY/.env
|
||||||
|
|
||||||
|
#run container
|
||||||
|
$DOCKER_COMPOSE -f $DIRECTORY/docker-compose.yml up --build -d > /dev/null 2>&1
|
||||||
|
|
||||||
|
echo "------------"
|
||||||
|
echo "WeBash was successfully started with docker and the following parameters:"
|
||||||
|
echo "port :" $PORT
|
||||||
|
echo "container name:" $NAME
|
||||||
|
echo "------------"
|
||||||
|
elif [ $1 = node ]; then
|
||||||
|
#check for dependencies
|
||||||
|
NODE=$(type -p node)
|
||||||
|
NPM=$(type -p npm)
|
||||||
|
if [ -z $NODE ]; then
|
||||||
|
echo "WeBash needs node.js to work, please install it."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z $NPM ]; then
|
||||||
|
echo "WeBash needs npm to work, please install it."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#Install dependencies npm
|
||||||
|
$NPM install
|
||||||
|
|
||||||
|
while [ -n "$1" ]; do
|
||||||
|
case $1 in
|
||||||
|
-p|--port) PORT=$1; shift;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -z $PORT ]; then
|
||||||
|
PORT="8085"
|
||||||
|
fi
|
||||||
|
|
||||||
|
touch $DIRECTORY/.env
|
||||||
|
echo "PORT=$PORT" >> $DIRECTORY/.env
|
||||||
|
|
||||||
|
#run container
|
||||||
|
$NPM start > $DIRECTORY/npmout.txt 2> $DIRECTORY/npmerr.txt &
|
||||||
|
|
||||||
|
echo "------------"
|
||||||
|
echo "WeBash was successfully started with node.js and the following parameters:"
|
||||||
|
echo "port :" $PORT
|
||||||
|
echo "------------"
|
||||||
|
else
|
||||||
|
echo "Unknown way"
|
||||||
|
echo "Here are the means available :"
|
||||||
|
echo "docker"
|
||||||
|
echo "node"
|
||||||
|
fi;;
|
||||||
|
|
||||||
|
stop )
|
||||||
|
#DOCKER
|
||||||
|
elif [ $1 = docker ]; then
|
||||||
|
#check for dependencies
|
||||||
|
DOCKER_COMPOSE=$(type -p docker-compose)
|
||||||
|
DOCKER=$(type -p docker)
|
||||||
|
if [ -z $DOCKER ]; then
|
||||||
|
echo "WeBash needs docker to work, please install it."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z $DOCKER_COMPOSE ]; then
|
||||||
|
echo "WeBash needs docker-compose to work, please install it."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#stop container
|
||||||
|
if [ ! -f $DIRECTORY/docker-compose.yml ]; then
|
||||||
|
echo "Container already stopped !"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
$DOCKER_COMPOSE -f $DIRECTORY/docker-compose.yml down --remove-orphans
|
||||||
|
fi
|
||||||
|
|
||||||
|
#removes files
|
||||||
|
rm $DIRECTORY/docker-compose.yml > /dev/null 2>&1
|
||||||
|
rm $DIRECTORY/Dockerfile > /dev/null 2>&1
|
||||||
|
#node
|
||||||
|
elif [ $1 = node ]; then
|
||||||
|
#check for dependencies
|
||||||
|
NODE=$(type -p node)
|
||||||
|
NPM=$(type -p npm)
|
||||||
|
if [ -z $NODE ]; then
|
||||||
|
echo "WeBash needs node.js to work, please install it."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z $NPM ]; then
|
||||||
|
echo "WeBash needs npm to work, please install it."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#stop npm
|
||||||
|
if [ ! -f $DIRECTORY/npmout.txt ]; then
|
||||||
|
echo "Node already stopped !"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
killall -SIGINT WeBash
|
||||||
|
fi
|
||||||
|
|
||||||
|
#removes files
|
||||||
|
rm $DIRECTORY/npmout.txt > /dev/null 2>&1
|
||||||
|
rm $DIRECTORY/npmerr.txt > /dev/null 2>&1
|
||||||
|
|
||||||
|
######################FILES FOR EVERY WAYS
|
||||||
|
#removes files
|
||||||
|
rm $DIRECTORY/.env > /dev/null 2>&1
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "Unknown way"
|
||||||
|
echo "Here are the means available :"
|
||||||
|
echo "docker"
|
||||||
|
echo "node"
|
||||||
|
fi
|
||||||
|
exit 0;;
|
||||||
|
* )
|
||||||
|
exit 0;;
|
||||||
|
esac
|
|
@ -1,6 +1,6 @@
|
||||||
/* Logo dynamique WeBash
|
/* Logo dynamique WeBash
|
||||||
* Par Alnotz !
|
* Par Alnotz !
|
||||||
* Version 2.0 (03/10/2021)
|
* Version 2.1 (24/07/2022)
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
_______________________________
|
_______________________________
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
\ /
|
\ /
|
||||||
\_________________________________/
|
\_________________________________/
|
||||||
*/
|
*/
|
||||||
/* g++ -std=c++17 -Wall -Wextra -c WeBashLogo.cpp && g++ -Wall -Wextra WeBashLogo.o -o WeBashLogo */
|
/* g++ -std=c++17 -Wall -Wextra -c WeBashCLILogo_v2.cpp && g++ -Wall -Wextra WeBashCLILogo_v2.o -o WeBashCLILogo_v2 */
|
||||||
#include <iostream>//I/O en C++.
|
#include <iostream>//I/O en C++.
|
||||||
#include <string>//Caractères C++.
|
#include <string>//Caractères C++.
|
||||||
#include <unistd.h>//Non standard en C de GNU pour 'usleep()'.
|
#include <unistd.h>//Non standard en C de GNU pour 'usleep()'.
|
||||||
|
@ -35,7 +35,7 @@ const auto LETTRES_LIGNES = 19;
|
||||||
const auto SORTIE_LIGNES = 19;
|
const auto SORTIE_LIGNES = 19;
|
||||||
const auto SORTIE_COLONNES = 100;
|
const auto SORTIE_COLONNES = 100;
|
||||||
/* Numéro de version. */
|
/* Numéro de version. */
|
||||||
const auto LOGO_VERSION = std::string("2.0");
|
const auto LOGO_VERSION = std::string("2.1");
|
||||||
/* Temps de pause (microsecondes). */
|
/* Temps de pause (microsecondes). */
|
||||||
const auto TEMPS_L = 800000;//Long.
|
const auto TEMPS_L = 800000;//Long.
|
||||||
const auto TEMPS_C = 200000;//Court.
|
const auto TEMPS_C = 200000;//Court.
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<meta name="color-scheme" content="dark light">
|
<meta name="color-scheme" content="dark light">
|
||||||
<meta name="description" content="Une page HTML pour illustrer le logo de WeBash en JavaScript. Conçu par Alnotz et sous GPL3+.">
|
<meta name="description" content="Une page HTML pour illustrer le logo de WeBash en JavaScript. Conçu par Alnotz et sous GPL3+.">
|
||||||
<title>WeBash Animated Logo</title>
|
<title>WeBash Animated Logo</title>
|
||||||
<link rel="stylesheet" type="text/css" href="WeBashLogo.css">
|
<link rel="stylesheet" type="text/css" href="WeBashLogoWeb.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Un logo animé de <em>WeBash</em></h1>
|
<h1>Un logo animé de <em>WeBash</em></h1>
|
||||||
|
@ -32,5 +32,5 @@
|
||||||
<img src=GNUGPLv3Plus.svg type="svg+xml/image" alt="Logo rouge avec marqué « GPLv3 or later »"/>
|
<img src=GNUGPLv3Plus.svg type="svg+xml/image" alt="Logo rouge avec marqué « GPLv3 or later »"/>
|
||||||
</a>
|
</a>
|
||||||
</body>
|
</body>
|
||||||
<script src="WeBashLogo.js" type="application/javascript" charset="utf-8"></script>
|
<script src="WeBashLogoWeb.js" type="application/javascript" charset="utf-8"></script>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue