-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a21064d
commit 046bc5e
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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=("ros_industrial_cmake_boilerplate") | ||
|
||
# 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 |