Skip to content

Commit

Permalink
bugfix: Use Unix + relative paths with rsync
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahbeckford committed Jan 21, 2023
1 parent 2b6e2df commit 3897925
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions ci/build-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ shift
OPAM_PACKAGE=$1
shift

if [ -x /usr/bin/cygpath ]; then
opamroot_unix=$(/usr/bin/cygpath -au "${opam_root}")
else
opamroot_unix="${opam_root}"
fi

# shellcheck disable=SC2154
echo "
=============
Expand All @@ -30,6 +36,11 @@ abi_pattern=$abi_pattern
opam_root=$opam_root
exe_ext=${exe_ext:-}
.
-------
Derived
-------
opamroot_unix=${opamroot_unix}
.
"

# PATH. Add opamrun
Expand Down Expand Up @@ -96,18 +107,12 @@ else
fi
install -d "${DIST}" "stage"
# Copy installation into stage/
case "${dkml_host_abi}" in
windows_*)
if command -v pacman; then
pacman -Sy --noconfirm --needed rsync
fi ;;
esac
for d in bin lib share/doc share/ocaml-config; do
echo "Copying $d ..."
ls -l "${opam_root}/dkml/$d/"
rm -rf "stage/${d:?}/"
install -d "stage/$d/"
rsync -a "${opam_root}/dkml/$d" "stage/"
rsync -a "${opamroot_unix}/dkml/$d/" "stage/$d"
done
# For Windows you must ask your users to first install the vc_redist executable.
# Confer: https://github.com/diskuv/dkml-workflows#distributing-your-windows-executables
Expand Down

0 comments on commit 3897925

Please sign in to comment.