mirror of https://github.com/namecoin/ncdns
Merge 0eb1c89204
into 4ea036742b
commit
022e627a00
@ -1,17 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eu -o pipefail
|
||||
shopt -s failglob
|
||||
|
||||
cp -a $(go env GOROOT)/src/crypto/x509/* ./
|
||||
rm ./x509_test.go
|
||||
|
||||
# The following code is utterly horrifying. I can't find a better way to do it. :(
|
||||
mkdir -p ${GOPATH}/src/vendor/golang.org/
|
||||
cp -R $(go env GOROOT)/src/vendor/golang_org/* ${GOPATH}/src/vendor/golang.org/
|
||||
# h/t to https://www.cyberciti.biz/faq/unix-linux-replace-string-words-in-many-files/
|
||||
OLD_PACKAGE='"golang_org/x/crypto/cryptobyte'
|
||||
OLD_PACKAGE="${OLD_PACKAGE//\//\\/}"
|
||||
NEW_PACKAGE='"golang.org/x/crypto/cryptobyte'
|
||||
NEW_PACKAGE="${NEW_PACKAGE//\//\\/}"
|
||||
sed -i "s/${OLD_PACKAGE}/${NEW_PACKAGE}/g" ./*.go ${GOPATH}/src/vendor/golang.org/x/crypto/cryptobyte/*.go
|
||||
#!/bin/sh
|
||||
set -e
|
||||
goroot="$(go env GOROOT)"
|
||||
x509path=$goroot/src/crypto/x509
|
||||
test -d $goroot
|
||||
test -d $x509path
|
||||
cp -av $x509path/* .
|
||||
rm x509_test.go
|
||||
sed -i.bak 's/golang_org/golang.org/g' x509.go
|
||||
|
Loading…
Reference in New Issue