Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fengzch-das
multibuild
Commits
02efabe6
Commit
02efabe6
authored
Jan 22, 2017
by
Matthew Brett
Browse files
Give repo copy a random name
parent
391dfa7d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
common_utils.sh
common_utils.sh
+3
-2
No files found.
common_utils.sh
View file @
02efabe6
...
...
@@ -256,8 +256,9 @@ function fill_submodule {
[
-
d
"
$git_loc
"
]
&&
return
# Need to recreate .git directory for submodule
local
origin_url
=
$(
cd
"
$repo_dir
"
&&
git config
--get
remote.origin.url
)
git clone
--
recursive
"
$repo_dir
"
"
${
repo_dir
}
-copy"
local
repo_copy
=
"
$repo_dir
-
$RANDOM
"
git clone
--
recursive
"
$repo_dir
"
"
$repo_copy
"
rm
-
rf
"
$repo_dir
"
mv
"
${
repo_
dir
}
-
copy"
"
$repo_dir
"
mv
"
${
repo_copy
}
"
"
$repo_dir
"
(
cd
"
$repo_dir
"
&&
git remote set-url origin
$origin_url
)
}
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