Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
e9b3b806
Commit
e9b3b806
authored
Apr 06, 2021
by
Kim Nguyễn
Browse files
Add options to the initialisation script.
parent
bb7dc100
Pipeline
#128
canceled with stage
in 31 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tools/init_opam_switch.sh
View file @
e9b3b806
...
...
@@ -4,9 +4,39 @@
#with CDuce PINS
#Change these variables to suit your needs
GIT_REPO
=
"git+https://gitlab.math.univ-paris-diderot.fr/cduce/cduce"
BRANCH
=
"d
une-switch
"
BRANCH
=
"d
evel
"
PACKAGES
=
"cduce-types cduce"
DO_INSTALL
=
""
DO_PIN
=
""
DO_PRINT
=
""
for
i
in
"
$@
"
do
if
test
"
$i
"
=
"--install"
;
then
DO_INSTALL
=
1
elif
test
"
$i
"
=
"--pin"
;
then
DO_PIN
=
1
elif
test
"
$i
"
=
"--print-deps"
;
then
DO_PRINT
=
1
elif
test
"
$i
"
=
"--help"
;
then
DO_INSTALL
=
""
DO_PIN
=
""
DO_PRINT
=
""
break
fi
done
if
test
-z
"
$DO_INSTALL
"
-a
-z
"
$DO_PIN
"
-a
-z
"
$DO_PRINT
"
;
then
echo
"Usage:
$0
[options]"
echo
echo
"options:"
echo
" --install install the developpment dependencies via opam"
echo
" --pin execute opam pin add on the git devel branch"
echo
" --print-deps print the development dependencies"
echo
" --help display this message"
exit
0
fi
##
OPAM
=
`
which opam
`
...
...
@@ -45,6 +75,13 @@ do
done
RDEPS
=
"
${
RDEPS
}
$q
"
done
"
$OPAM
"
pin
-y
--no-action
add cduce-types
"
${
GIT_REPO
}
#
${
BRANCH
}
"
"
$OPAM
"
pin
-y
--no-action
add cduce
"
${
GIT_REPO
}
#
${
BRANCH
}
"
"
$OPAM
"
install
-y
$RDEPS
\ No newline at end of file
if
test
"
$DO_PRINT
"
;
then
echo
"
$RDEPS
"
fi
if
test
"
$DO_PIN
"
;
then
"
$OPAM
"
pin
-y
--no-action
add cduce-types
"
${
GIT_REPO
}
#
${
BRANCH
}
"
"
$OPAM
"
pin
-y
--no-action
add cduce
"
${
GIT_REPO
}
#
${
BRANCH
}
"
fi
if
test
"
$DO_INSTALL
"
;
then
"
$OPAM
"
install
-y
$RDEPS
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment