-
Notifications
You must be signed in to change notification settings - Fork 89
/
.run-cpack
executable file
·33 lines (28 loc) · 1.15 KB
/
.run-cpack
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
# Get default extension based on OS
unameOut="$(uname -s)"
case "${unameOut}" in
Linux*) default_ext=deb;;
Darwin*) default_ext=osx;;
CYGWIN*) default_ext=nupkg;;
MINGW*) default_ext=nupkg;;
*) default_ext=deb
esac
# The defaults assume this was ran from the package directory
artifact_dir=${CPACK_ARTIFACTS_DIR:-`pwd`}
build_dir=${CPACK_WORKING_DIR:-$(dirname $0)/../../build}
artifact_ext=${CPACK_ARTIFACTS_EXT:-$default_ext}
echo "Input Parameters:"
echo " artifact_dir: $artifact_dir"
echo " artifact_ext: $artifact_ext"
echo " build_dir: $build_dir"
declare -a StringArray=("tesseract_collision" "tesseract_common" "tesseract_environment" "tesseract_geometry" "tesseract_kinematics" "tesseract_scene_graph" "tesseract_support" "tesseract_urdf" "tesseract_srdf" "tesseract_visualization" "tesseract_state_solver")
# Iterate the packages using for loop
for val in ${StringArray[@]}; do
if [ -d "$build_dir/$val" ] && [ -f "$build_dir/$val/CPackConfig.cmake" ]; then
cd $build_dir/$val
cpack --config CPackConfig.cmake
cp ./*.$artifact_ext $artifact_dir
cp ./*.tar.xz $artifact_dir
fi
done