Skip to content

Commit

Permalink
distribute simple examples
Browse files Browse the repository at this point in the history
  • Loading branch information
vszakats committed Oct 30, 2023
1 parent c5a562b commit dca3849
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions curl-pkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
_BAS="${_NAM}-${_VER}${_PKGSUFFIX}"
_DST="$(pwd)/_pkg"; rm -r -f "${_DST}"

mkdir -p "${_DST}/docs/examples"
mkdir -p "${_DST}/docs/libcurl/opts"
mkdir -p "${_DST}/include/curl"
mkdir -p "${_DST}/lib"
Expand Down Expand Up @@ -176,6 +177,14 @@
cp -f -p README "${_DST}/README.txt"
cp -f -p RELEASE-NOTES "${_DST}/RELEASE-NOTES.txt"

# Copy simple examples
cat docs/examples/Makefile.inc \
| tr $'\n' '^' | sed 's/\\^//g' | tr '^' $'\n' \
| grep 'check_PROGRAMS' | grep -a -o -E '=.+$' | cut -c 2- \
| sed -E 's/ +/ /g' | tr ' ' $'\n' | while read -r f; do
cp -f -p "docs/examples/${f}.c" "${_DST}/docs/examples/"
done

if [ "${_OS}" = 'win' ]; then
cp -f -p "${_PP}"/bin/*.def "${_DST}/bin/"
fi
Expand Down

0 comments on commit dca3849

Please sign in to comment.