There was an error while loading. Please reload this page.
1 parent dbf5b16 commit 0274cd6Copy full SHA for 0274cd6
1 file changed
rsc/extra/generate_lock_file.sh
@@ -1,9 +1,13 @@
1
#!/usr/bin/env bash
2
set -euo pipefail
3
-export LOCKED_SWITCH="alt-ergo-locked"
+export LOCKED_SWITCH="${LOCKED_SWITCH:=alt-ergo-locked}"
4
export OPAMYES=true
5
export OPAMSWITCH="$LOCKED_SWITCH"
6
7
+function cleanup() {
8
+ opam switch remove "$LOCKED_SWITCH"
9
+}
10
+
11
function check_switch_available() {
12
opam list >/dev/null 2>&1
13
}
@@ -16,6 +20,7 @@ EOF
16
20
exit 1
17
21
fi
18
22
23
+trap cleanup EXIT
19
24
opam switch create "$LOCKED_SWITCH" 5.4.1 --no-switch
25
26
opam install --deps-only --with-test --assume-depexts \
0 commit comments