scripts update

This commit is contained in:
sHa
2019-06-07 10:52:51 +03:00
parent 4796312a6d
commit 9cbc5c37b8
2 changed files with 17 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "sscripts", "name": "sscripts",
"version": "1.0.2", "version": "1.0.3",
"description": "Useful Shell scripts for projects", "description": "Useful Shell scripts for projects",
"author": "sHa <sha@shadoll.dev>", "author": "sHa <sha@shadoll.dev>",
"license": "MIT", "license": "MIT",

View File

@@ -8,7 +8,22 @@
# #
DIR=$(dirname $BASH_SOURCE) DIR=$(dirname $BASH_SOURCE)
PROJECT=$(cd $DIR"/.."; pwd) PROJECT=(${DIR//node_modules/ })
if [ ! -d $PROJECT/storage ]; then
echo "ERROR: '$PROJECT/storage' dir not found"
exit 1
fi
gity --version 2>&1 >/dev/null
GIT_IS_AVAILABLE=$?
if [ ! $GIT_IS_AVAILABLE -eq 0 ]; then
echo "ERROR: The program 'git' is currently not installed."
echo "Try: 'sudo apt install git' to install it"
exit 1
fi
cd $PROJECT/storage cd $PROJECT/storage
git add . --all && git add . --all &&