Last active
August 29, 2018 09:44
-
-
Save s-urbaniak/dcfbb9c15eb575d24223577c17af4215 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x | |
PKG=( apimachinery apiserver client-go kube-aggregator sample-apiserver ) | |
function main { | |
case "$1" in | |
"mounts") mounts;; | |
"links") links;; | |
esac | |
} | |
function mounts { | |
for pkg in "${PKG[@]}"; do | |
unlink ${PWD}/vendor/k8s.io/${pkg} | |
mkdir ${PWD}/vendor/k8s.io/${pkg} | |
sudo mount --bind \ | |
${PWD}/staging/src/k8s.io/${pkg} \ | |
${PWD}/vendor/k8s.io/${pkg} | |
done | |
} | |
function links { | |
for pkg in "${PKG[@]}"; do | |
sudo umount \ | |
${PWD}/vendor/k8s.io/${pkg} | |
rmdir ${PWD}/vendor/k8s.io/${pkg} | |
ln -s ../../staging/src/k8s.io/${pkg} ${PWD}/vendor/k8s.io/${pkg} | |
done | |
} | |
main $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ln -s $GOPATH/src/k8s.io/kubernetes/_output/local/go/bin bin | |
ln -s $GOPATH/src/k8s.io/kubernetes/_output/local/go/pkg pkg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment