2019-05-14 20:04:46 +04:00
|
|
|
#!/bin/bash
|
|
|
|
set -euET -o pipefail
|
2019-05-15 16:01:51 +04:00
|
|
|
main(){
|
|
|
|
root_dir="$(pwd | sed -e 's/\\/\\\\/' | sed -e 's/&/\\\&/' | sed -e 's/~/\\~/')"
|
2019-05-27 13:30:28 +04:00
|
|
|
rm -fr vendors/ligo-opam-repository-local-generated
|
|
|
|
mkdir vendors/ligo-opam-repository-local-generated
|
|
|
|
cp -a index.tar.gz packages repo urls.txt vendors/ligo-opam-repository-local-generated
|
|
|
|
cd vendors/ligo-opam-repository-local-generated
|
2019-05-27 15:10:29 +04:00
|
|
|
grep -r --null -l src: | grep -z 'opam$' | xargs -0 \
|
|
|
|
sed -i -e 's~src: *"https://gitlab.com/ligolang/ligo/-/archive/master/ligo\.tar\.gz"~src: "file://'"$root_dir"'"~'
|
2019-05-27 12:53:33 +04:00
|
|
|
# TODO: run the update.sh script adequately to regenerate the index.tar.gz etc. in the local repo
|
2019-05-15 16:01:51 +04:00
|
|
|
}
|
|
|
|
if main; then exit 0; else exit $?; fi
|