Commit ca005c1a authored by Ralf Jung's avatar Ralf Jung

fix pin detection

parent 140a6f0a
Pipeline #4746 passed with stage
in 7 minutes and 2 seconds
......@@ -51,8 +51,8 @@ while (( "$#" )); do # while there are arguments left
VERSION="$1" ; shift
# Check if the pin is already set
PIN=$(opam pin list | (egrep "^$PACKAGE[. ]" || true))
if [[ "$(echo "$PIN" | cut -d ' ' -f 2)" == "$KIND" && "$(echo "$PIN" | cut -d ' ' -f 3)" == "$VERSION" ]]; then
read -a PIN <<< $(opam pin list | (egrep "^$PACKAGE[. ]"))
if [[ "${PIN[1]}" == "$KIND" && "${PIN[2]}" == "$VERSION" ]]; then
echo "[opam-ci] $PACKAGE already $KIND-pinned to $VERSION"
else
echo "[opam-ci] $KIND-pinning $PACKAGE to $VERSION"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment