Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
gitlab-profile
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hotwheels
gitlab-profile
Commits
6fbdf337
Commit
6fbdf337
authored
6 months ago
by
Antonio Ragagnin
Browse files
Options
Downloads
Patches
Plain Diff
fix clone script
parent
4c6858f3
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
cloneall.bash
+32
-14
32 additions, 14 deletions
cloneall.bash
with
32 additions
and
14 deletions
cloneall.bash
100644 → 100755
+
32
−
14
View file @
6fbdf337
#!/bin/bash
set
-vex
REPOS
=(
gitlab-profile core io integrate octree domain PM
)
SESSION_NAME
=
h
o
w
REPOS
=(
${
REPOS
:
=
gitlab-profile core io integrate octree domain PM
}
)
:
${
SESSION_NAME
:
=hw
}
while
getopts
"csapt"
opt
while
getopts
"cptlr:"
opt
do
case
"
$opt
"
in
c
)
clona
=
1
;;
s
)
tmux
a
=
1
;;
a
)
attacch
a
=
1
;;
p
)
in
stall
a
=
1
;;
t
)
testa
=
1
;;
p
)
pyinst
a
=
1
;;
t
)
tmux
a
=
1
;;
l
)
l
in
k
a
=
1
;;
r
)
shift
$((
OPTIND
-
2
))
&&
REPOS
=(
$@
)
&&
break
esac
done
if
[
-z
"
$clona
"
]
&&
[
-z
"
$tmuxa
"
]
&&
[
-z
"
$
attacch
a
"
]
;
then
echo
'usage: ./cloneall.bash -c (clone repos) -p (p
ip
install
) -t (python
tests) -
s
(
create screen tmux session
) -
a
(
attach to tmux
)'
if
[
-z
"
$clona
"
]
&&
[
-z
"
$pyinsta
"
]
&&
[
-z
"
$tmuxa
"
]
&&
[
-z
"
$
link
a
"
]
;
then
echo
'usage: ./cloneall.bash -c (clone repos) -p (p
ython
install
and
tests) -
t
(
attach to tmux) -l (full tree of links
) -
r
(
repos
)'
exit
1
fi
for
REPO
in
"
${
REPOS
[@]
}
"
;
do
echo
[
$REPO
]
done
#exit 0
if
[
!
-z
"
$clona
"
]
;
then
[[
!
-d
"venv"
]]
&&
python3
-mvenv
venv
.
venv/bin/activate
...
...
@@ -33,19 +39,34 @@ if [ ! -z "$clona" ]; then
pushd
$REPO
git switch dev
||
echo
no dev branch
if
[[
"
$REPO
"
!=
"gitlab-profile"
]]
;
then
[
!
-z
"
$installa
"
]
&&
python
-mpip
install
-e
.
[
!
-z
"
$testa
"
]
&&
python
-m
hotwheels.checkup hotwheels/
[
!
-z
"
$pyinsta
"
]
&&
python
-mpip
install
-e
.
&&
python
-m
hotwheels.checkup hotwheels/
fi
popd
done
fi
if
[
!
-z
"
$linka
"
]
;
then
mkdir
-p
full/hotwheels
touch
full/hotwheels/__init__.py
||
echo
cant
touch
for
f
in
core/hotwheels/
*
;
do
[[
"
${
f
##*/
:0:2
}
"
==
"__"
]]
&&
continue
ln
-sf
$PWD
/
$f
full/hotwheels/
${
f
##*/
}
done
for
REPO
in
"
${
REPOS
[@]
}
"
;
do
if
[
"
$REPO
"
!=
"core"
]
&&
[
"
$REPO
"
!=
"gitlab-profile"
]
;
then
ln
-sf
$PWD
/
$REPO
/hotwheels/
$REPO
full/hotwheels/
$REPO
fi
done
fi
if
[
!
-z
"
$tmuxa
"
]
;
then
if
!
tmux has-session
-t
$SESSION_NAME
;
then
# Create a new tmux session
tmux new-session
-d
-s
$SESSION_NAME
-c
$PWD
[[
-d
full
]]
&&
REPOS+
=(
full
)
for
index
in
"
${
!REPOS[@]
}
"
;
do
value
=
"
${
REPOS
[index]
}
"
...
...
@@ -57,9 +78,6 @@ if [ ! -z "$tmuxa" ]; then
tmux new-window
-t
$SESSION_NAME
-c
$PWD
done
fi
fi
if
[
!
-z
"
$attaccha
"
]
;
then
tmux attach-session
-t
$SESSION_NAME
fi
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment