Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-admin-essentials
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etersoft-admin-essentials
Commits
1564d839
Commit
1564d839
authored
Mar 15, 2017
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add setprojectshare
parent
99b5b6b9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
+49
-0
setprojectshare
utils/setprojectshare
+49
-0
No files found.
utils/setprojectshare
0 → 100755
View file @
1564d839
#!/bin/bash -x
# 2006 (c) Etersoft http://etersoft.ru
# 2008 (c) Etersoft http://etersoft.ru
# 2011 (c) Etersoft http://etersoft.ru
# Authors:
# Alexander Plikus <pav@etersoft.ru>
# Vitaly Lipatov <lav@etersoft.ru>
# GNU Public License
# Work group:
NAME_GR
=
"builder"
SET
=
for
i
in
1 2
;
do
case
"
$1
"
in
(
"--help"
|
"-h"
|
""
)
help
exit
;;
(
"--set"
|
"-s"
)
SET
=
1
shift
;;
(
"--group"
|
"-g"
)
shift
NAME_GR
=
"
$1
"
shift
;;
esac
done
WORK_DIR
=
"
$1
"
if
!
[
-d
"
$WORK_DIR
"
]
;
then
echo
"Directory '
$WORK_DIR
' is not found."
;
echo
exit
fi
if
[
-n
"
$SET
"
]
;
then
gettext
"Fix permissions and group..."
;
echo
find
"
$WORK_DIR
"
!
-group
"
$NAME_GR
"
-print0
| xargs
-0
--no-run-if-empty
chgrp
-v
$NAME_GR
find
"
$WORK_DIR
"
!
-perm
0664
-type
f
-print0
| xargs
-0
--no-run-if-empty
chmod
-v
0664
find
"
$WORK_DIR
"
!
-perm
02775
-type
d
-print0
| xargs
-0
--no-run-if-empty
chmod
-v
02775
exit
0
else
exit
1
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment