Skip to content
Snippets Groups Projects
Commit 8a7e7a18 authored by Joaquim Casals Buñuel's avatar Joaquim Casals Buñuel
Browse files

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
...@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment