Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
wolf
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
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile_robotics
wolf_projects
wolf_lib
wolf
Commits
8a7e7a18
Commit
8a7e7a18
authored
6 years ago
by
Joaquim Casals Buñuel
Browse files
Options
Downloads
Patches
Plain Diff
Made some changes to wolf_update.sh. Hardcoded plugins dependencies.
parent
250002e3
No related branches found
No related tags found
No related merge requests found
Pipeline
#3497
passed
6 years ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wolf_scripts/wolf_update.sh
+71
-15
71 additions, 15 deletions
wolf_scripts/wolf_update.sh
with
71 additions
and
15 deletions
wolf_scripts/wolf_update.sh
+
71
−
15
View file @
8a7e7a18
...
@@ -4,8 +4,14 @@
...
@@ -4,8 +4,14 @@
declare
-A
success
declare
-A
success
cd
$1
cd
$1
abs_path
=
$(
pwd
)
abs_path
=
$(
pwd
)
for
folder
in
$(
cd
$abs_path
&&
ls
-d
*
)
;
do
# for folder in $(cd $abs_path && ls -d *); do
echo
"Starting with
$folder
"
for
folder
in
wolf IMU laser gnss vision apriltag
;
do
echo
""
echo
"==========================================================================================================================="
echo
"
${
CYAN
}
Updating & installing
$folder
${
NC
}
"
echo
"==========================================================================================================================="
echo
""
sleep
1
cd
$abs_path
cd
$abs_path
echo
$(
pwd
)
echo
$(
pwd
)
cd
$folder
cd
$folder
...
@@ -13,38 +19,88 @@ for folder in $(cd $abs_path && ls -d *); do
...
@@ -13,38 +19,88 @@ for folder in $(cd $abs_path && ls -d *); do
success[
$folder
]=
false
success[
$folder
]=
false
if
[
$is_repo
]
;
then
if
[
$is_repo
]
;
then
current_branch
=
$(
git status |
head
-n
1 |
cut
-d
' '
-f
3
)
current_branch
=
$(
git status |
head
-n
1 |
cut
-d
' '
-f
3
)
if
git checkout devel
;
then
# if git checkout devel; then
if
git pull
;
then
if
[
!
-d
build
]
;
if
[
!
-d
build
]
;
then
then
mkdir
build
mkdir
build
fi
fi
cd
build
cd
build
if
!
cmake ..
;
then
if
!
cmake ..
;
then
echo
"CMake has failed, avorting process for
$folder
"
echo
""
git checkout
$current_branch
echo
"==========================================================================================================================="
continue
;
echo
"
${
RED
}
CMake has failed, avorting process for
$folder
${
NC
}
"
echo
"==========================================================================================================================="
echo
""
sleep
1
# git checkout $current_branch
continue
fi
fi
if
!
make
-j
"
$(
nproc
)
"
;
then
if
!
make
-j
"
$(
nproc
)
"
;
then
echo
"Make has failed, avorting process for
$folder
"
echo
""
git checkout
$current_branch
echo
"==========================================================================================================================="
echo
"
${
RED
}
Make has failed, avorting process for
$folder
${
NC
}
"
echo
"==========================================================================================================================="
echo
""
sleep
1
# git checkout $current_branch
continue
continue
fi
fi
if
!
ctest
-j
"
$(
nproc
)
"
;
then
if
!
ctest
-j
"
$(
nproc
)
"
;
then
echo
"Tests have not succeeded, avorting installation"
echo
""
git checkout
$current_branch
echo
"==========================================================================================================================="
echo
"
${
RED
}
Tests have not succeeded, avorting installation
${
NC
}
"
echo
"==========================================================================================================================="
echo
""
sleep
1
# git checkout $current_branch
continue
fi
if
!
sudo
make
install
;
then
echo
""
echo
"==========================================================================================================================="
echo
"
${
RED
}
Installation for
$folder
failed
${
NC
}
"
echo
"==========================================================================================================================="
echo
""
sleep
1
continue
continue
fi
fi
sudo
make
install
echo
""
git checkout
$current_branch
echo
"==========================================================================================================================="
echo
"
${
GREEN
}
Everything went smoothly on
$folder
${
NC
}
"
echo
"==========================================================================================================================="
echo
""
sleep
1
# git checkout $current_branch
success[
$folder
]=
true
success[
$folder
]=
true
else
else
echo
"No devel branch to checkout, skipping
$folder
"
# echo "No devel branch to checkout, skipping $folder"
echo
""
echo
"==========================================================================================================================="
echo
"
${
ORANGE
}
Something went wrong when pulling... skipping
$folder
${
NC
}
"
echo
"==========================================================================================================================="
echo
""
sleep
1
fi
fi
else
else
echo
"Skipping
$folder
... Not a git repo"
echo
""
echo
"==========================================================================================================================="
echo
"
${
CYAN
}
Skipping
$folder
... Not a git repo
${
NC
}
"
echo
"==========================================================================================================================="
echo
""
sleep
1
fi
fi
echo
"Finished with
$folder
"
# echo ""
# echo "==========================================================================================================================="
# echo "${YELLOW} Finished with $folder ${NC}"
# echo "==========================================================================================================================="
# echo ""
done
done
echo
""
echo
"==========================================================================================================================="
echo
"
${
CYAN
}
SUMMARY
${
NC
}
"
echo
"==========================================================================================================================="
echo
""
for
fl
in
"
${
!success[@]
}
"
;
for
fl
in
"
${
!success[@]
}
"
;
do
do
if
"
${
success
[
$fl
]
}
"
;
then
if
"
${
success
[
$fl
]
}
"
;
then
...
...
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