...
 
Commits (5)
...@@ -51,8 +51,11 @@ while (( "$#" )); do # while there are arguments left ...@@ -51,8 +51,11 @@ while (( "$#" )); do # while there are arguments left
VERSION="$1" ; shift VERSION="$1" ; shift
# Check if the pin is already set # Check if the pin is already set
PIN=$(opam pin list | (egrep "^$PACKAGE[. ]" || true)) read -a PIN <<< $(opam pin list | (egrep "^$PACKAGE[. ]"))
if [[ "$(echo "$PIN" | cut -d ' ' -f 2)" == "$KIND" && "$(echo "$PIN" | cut -d ' ' -f 3)" == "$VERSION" ]]; then echo "Detected pin: $PIN"
echo "${PIN[1]}"
echo "${PIN[2]}"
if [[ "${PIN[1]}" == "$KIND" && "${PIN[2]}" == "$VERSION" ]]; then
echo "[opam-ci] $PACKAGE already $KIND-pinned to $VERSION" echo "[opam-ci] $PACKAGE already $KIND-pinned to $VERSION"
else else
echo "[opam-ci] $KIND-pinning $PACKAGE to $VERSION" echo "[opam-ci] $KIND-pinning $PACKAGE to $VERSION"
......