Browse Source

Improve CI script

 + It's a bad practice to assign something to $1 according to the bash manual
Leo 8 years ago
parent
commit
1a1ab65cf5
1 changed files with 3 additions and 2 deletions
  1. 3 2
      gitlab-ci.sh

+ 3 - 2
gitlab-ci.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 
 # OCaml version is assuming to be set (for instance as system compiler) if
 # OCaml version is assuming to be set (for instance as system compiler) if
 # nothing is passed
 # nothing is passed
@@ -8,7 +8,8 @@
 # Use -y with evry opam command
 # Use -y with evry opam command
 export OPAMYES=true
 export OPAMYES=true
 # Installing opam
 # Installing opam
-opam init --comp="${1:=system}"
+comp=${1:-system}
+opam init --comp="${comp}"
 eval `opam config env`
 eval `opam config env`
 
 
 # Versions
 # Versions