Rewrite local opam repository into a different folder

This commit is contained in:
Georges Dupéron 2019-05-15 16:44:45 +02:00
parent c794c61699
commit 2b4eaa29d1

View File

@ -2,7 +2,9 @@
set -euET -o pipefail set -euET -o pipefail
main(){ main(){
root_dir="$(pwd | sed -e 's/\\/\\\\/' | sed -e 's/&/\\\&/' | sed -e 's/~/\\~/')" root_dir="$(pwd | sed -e 's/\\/\\\\/' | sed -e 's/&/\\\&/' | sed -e 's/~/\\~/')"
cd vendors/ligo-opam-repository rm -fr vendors/ligo-opam-repository-local
cp -a vendors/ligo-opam-repository vendors/ligo-opam-repository-local
cd vendors/ligo-opam-repository-local
git grep -z -l src: | grep -z 'opam$' | xargs -0 \ git grep -z -l src: | grep -z 'opam$' | xargs -0 \
sed -i -e 's~src: *"https://gitlab.com/gabriel.alfour/ligo/-/archive/master/ligo.tar.gz"~src: "file://'"$root_dir"'"~' \ sed -i -e 's~src: *"https://gitlab.com/gabriel.alfour/ligo/-/archive/master/ligo.tar.gz"~src: "file://'"$root_dir"'"~' \
-e 's~src: *"https://gitlab.com/gabriel.alfour/ligo-utils/-/archive/master/ligo-utils.tar.gz"~src: "file://'"$root_dir"'/vendors/ligo-utils"~' \ -e 's~src: *"https://gitlab.com/gabriel.alfour/ligo-utils/-/archive/master/ligo-utils.tar.gz"~src: "file://'"$root_dir"'/vendors/ligo-utils"~' \