Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/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 $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.