Skip to content

Commit 86000f3

Browse files
author
Emiliano Borghi
committed
Script to ignore packages to compile
1 parent b85ccf1 commit 86000f3

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.vscode/
22
*.pyc
3+
CATKIN_IGNORE

ca_bringup/scripts/ignore_pkgs.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
CPU=$(lscpu | grep -oP 'Architecture:\s*\K.+')
4+
5+
SCRIPT_PATH="$( cd "$(dirname "$0")" ; pwd -P )"
6+
SRC_PATH="$( realpath ${SCRIPT_PATH}/../.. )"
7+
8+
# Colors
9+
RED='\033[0;31m'
10+
YELLOW='\033[1;33m'
11+
NC='\033[0m' # No Color
12+
13+
ARM_IGNORED_PKGS=("ca_gazebo" "ca_imu")
14+
15+
# If the CPU architecture is an ARM (Raspberry) don't compile some packages.
16+
if [ "$CPU" == *"arm"* ] ; then
17+
echo -e "${YELLOW}Skipping compilation of some packages because of ARM architecure.${NC}"
18+
19+
for pkg in ${ARM_IGNORED_PKGS} ; do
20+
touch "${SRC_PATH}/${pkg}/CATKIN_IGNORE"
21+
done
22+
fi

0 commit comments

Comments
 (0)