start-work.sh
Start run project when run script
- start-work.sh
#!/usr/bin/bash
# start work
. ~/utils.sh
# jump to work directory
uiProject=/c/project/path/
if [ -d $uiProject ]
then
echoNotice "The node server is starting up..."
cd $uiProject
npm run dev
echoNotice "Node Server Has Stopped!"
else
echoError "The $uiProject directory does not exists"
fi
- utils.sh
#!/usr/bin/bash
function echoError {
echo -e "\033[31m $1 \033[0m"
}
function echoSuccess {
echo -e "\033[32m $1 \033[0m"
}
function echoNotice {
echo -e "\033[33m $1 \033[0m"
}