This commit is contained in:
sHa
2019-06-07 11:32:20 +03:00
parent 0f40a55db3
commit b9879d231c
5 changed files with 50 additions and 6 deletions

View File

@@ -1,2 +1,40 @@
# sscript # sscript
Useful Shell scripts for projects Useful Shell scripts for projects
# Install
with npm
`npm install sscripts`
with yarn
`yarn add sscripts`
# Run
shell
`./node_modules/.bin/{script_name}`
npm
`npm run {script_name}`
yarn
`yarn {script_name}`
# Scripts
## git
### storage_push
Upload all changes in storage folder into git repository
### submodule_pull
## file system
### fix_permissions

View File

@@ -1,6 +1,6 @@
{ {
"name": "sscripts", "name": "sscripts",
"version": "1.0.5", "version": "1.0.6",
"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",
@@ -14,11 +14,13 @@
"bin": { "bin": {
"hello.sh": "./scripts/hello.sh", "hello.sh": "./scripts/hello.sh",
"hello.js": "./scripts/hello.js", "hello.js": "./scripts/hello.js",
"git.storage_push": "./scripts/git.storage_push.sh" "git.storage_push": "./scripts/git/storage_push.sh",
"fs.fix_permissions": "./scripts/fs/fix_permissions.sh"
}, },
"scripts": { "scripts": {
"hello.sh": "./scripts/hello.sh", "hello.sh": "./scripts/hello.sh",
"hello.js": "./scripts/hello.js", "hello.js": "./scripts/hello.js",
"git.storage_push": "./scripts/git.storage_push.sh" "git.storage_push": "./scripts/git/storage_push.sh",
"fs.fix_permissions": "./scripts/fs/fix_permissions.sh"
} }
} }

View File

@@ -7,10 +7,14 @@
# @link https://shadoll.dev # @link https://shadoll.dev
# #
DIR=$(dirname "$0") DIR=$(dirname $BASH_SOURCE)
ROOT=$(cd "$DIR"/.. && pwd) PROJECT=(${DIR//node_modules/ })
sudo chmod -R a=rwX,go-rwX "$ROOT"/docker/.ssh/ ROOT=$(cd "$PROJECT"/.. && pwd)
sudo chown -R :www-data $ROOT sudo chown -R :www-data $ROOT
sudo chmod -R g+rwX $ROOT sudo chmod -R g+rwX $ROOT
if [ -d $ROOT/docker/.ssh/]; then
sudo chmod -R a=rwX,go-rwX "$ROOT"/docker/.ssh/
fi