mirror of
https://git.zx2c4.com/wireguard-go
synced 2024-11-15 09:15:14 +01:00
21 lines
509 B
Bash
21 lines
509 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
echo "# This was generated by ./generate-vendor.sh" > Gopkg.lock
|
||
|
echo "# This was generated by ./generate-vendor.sh" > Gopkg.toml
|
||
|
|
||
|
while read -r package; do
|
||
|
cat >> Gopkg.lock <<-_EOF
|
||
|
[[projects]]
|
||
|
branch = "master"
|
||
|
name = "$package"
|
||
|
revision = "$(< "$GOPATH/src/$package/.git/refs/heads/master")"
|
||
|
|
||
|
_EOF
|
||
|
cat >> Gopkg.toml <<-_EOF
|
||
|
[[constraint]]
|
||
|
branch = "master"
|
||
|
name = "$package"
|
||
|
|
||
|
_EOF
|
||
|
done < <(sed -n 's/.*"\(golang.org\/x\/[^/]\+\)\/\?.*".*/\1/p' *.go */*.go | sort | uniq)
|