-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cpack support for debian and nuget package creation
- Loading branch information
1 parent
51c08ad
commit 110a7ef
Showing
3 changed files
with
117 additions
and
1 deletion.
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
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=("tesseract_qt") | ||
|
||
# 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 |
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