mirror of
https://github.com/shadoll/sscript.git
synced 2025-12-20 03:27:00 +00:00
update
This commit is contained in:
38
README.md
38
README.md
@@ -1,2 +1,40 @@
|
||||
# sscript
|
||||
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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sscripts",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.6",
|
||||
"description": "Useful Shell scripts for projects",
|
||||
"author": "sHa <sha@shadoll.dev>",
|
||||
"license": "MIT",
|
||||
@@ -14,11 +14,13 @@
|
||||
"bin": {
|
||||
"hello.sh": "./scripts/hello.sh",
|
||||
"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": {
|
||||
"hello.sh": "./scripts/hello.sh",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,10 +7,14 @@
|
||||
# @link https://shadoll.dev
|
||||
#
|
||||
|
||||
DIR=$(dirname "$0")
|
||||
ROOT=$(cd "$DIR"/.. && pwd)
|
||||
DIR=$(dirname $BASH_SOURCE)
|
||||
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 chmod -R g+rwX $ROOT
|
||||
|
||||
if [ -d $ROOT/docker/.ssh/]; then
|
||||
sudo chmod -R a=rwX,go-rwX "$ROOT"/docker/.ssh/
|
||||
fi
|
||||
Reference in New Issue
Block a user