Skip to content

Commit

Permalink
get_config.sh: Add in script to easily get current build configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdeep1 committed Dec 19, 2023
1 parent a3ed466 commit c162187
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 6 deletions.
22 changes: 16 additions & 6 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,22 @@ details, it may not be possible to resolve your issue.**

## libcoap Configuration Summary

Copy all the "libcoap Configuration Summary:" output lines (about 40 lines) here after running
`./configure` (with any options that you have specified)
or
`cmake ..` (with any -D options that you have specified)
or if neither of the above two methods is used (do from within the libcoap directory)
`git describe --tags`
If get_config,sh exists, please copy the output from (do in the top level libcoap directory) :-
```
./get_config.sh
```
Else if using ./configure, please copy the output from (do in the top level libcoap directory) :-
```
cat config.log | egrep "result: | libcoap| host s" | cut -d\ -f3-
```
Else if using cmake, please copy the output from (do in the cmake build directory) :-
```
cmake -LH . | cut -d\ -f2- | egrep "\.\." | egrep "^[A-Z][A-Z]"
```
Else please copy the output from (do from within the libcoap directory) :-
```
git describe --tags --dirty --always
```

## Problem Description

Expand Down
30 changes: 30 additions & 0 deletions get_config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#/bin/bash

#
# This is a helper script to get what the current build configuration is
#

TAGS=0
if [ -f config.log ] ; then
echo "Last ./configure build"
echo ""
cat config.log | egrep " libcoap| host s" | cut -d\ -f7-
cat config.log | egrep "result: " | cut -d\ -f3- | cut -d\ -f7-
echo ""
TAGS=1
fi
for f in `find . -name CMakeCache.txt -print` ; do
DIR=`dirname $f`
echo "Last cmake build in $DIR"
echo ""
(cd $DIR ; cmake -LH . | cut -d\ -f2- | egrep "\.\." | egrep "^[A-Z][A-Z]")
echo ""
TAGS=1
done

if [ "$TAGS" = 0 ] ; then
echo "Current git source"
echo ""
git describe --tags --dirty --always
echo ""
fi

0 comments on commit c162187

Please sign in to comment.