Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-shell
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-shell
Commits
b5329487
Commit
b5329487
authored
Feb 03, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #93 from raphendyr/patch-3
Remove hard coded home
parents
56e216f3
f457f974
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
14 deletions
+8
-14
support/rewrite-hooks.sh
support/rewrite-hooks.sh
+8
-14
No files found.
support/rewrite-hooks.sh
View file @
b5329487
...
...
@@ -3,25 +3,19 @@
# $1 is an optional argument specifying the location of the repositories directory.
# Defaults to /home/git/repositories if not provided
home_dir
=
"/home/git"
src
=
${
1
:-
"
$home_dir
/repositories"
}
src
=
${
1
:-
"
$HOME
/repositories"
}
function
create_link_in
{
ln
-s
-f
"
$
home_dir
/gitlab-shell/hooks/update"
"
$1
/hooks/update"
ln
-s
-f
"
$
HOME
/gitlab-shell/hooks/update"
"
$1
/hooks/update"
}
for
dir
in
`
ls
"
$src
/"
`
do
if
[
-d
"
$src
/
$dir
"
]
;
then
if
[[
"
$dir
"
=
~ ^.
*
\.
git
$
]]
then
create_link_in
"
$src
/
$dir
"
for
dir
in
"
$src
/"
*
;
do
if
[
-d
"
$dir
"
]
;
then
if
[
"
$dir
"
!=
"
${
dir
%.git
}
"
]
;
then
create_link_in
"
$dir
"
else
for
subdir
in
`
ls
"
$src
/
$dir
/"
`
do
if
[
-d
"
$src
/
$dir
/
$subdir
"
]
&&
[[
"
$subdir
"
=
~ ^.
*
\.
git
$
]]
;
then
create_link_in
"
$src
/
$dir
/
$subdir
"
fi
for
subdir
in
"
$dir
/"
*
.git
;
do
create_link_in
"
$subdir
"
done
fi
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