Skip to content

Instantly share code, notes, and snippets.

@s-urbaniak
Last active August 29, 2018 09:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save s-urbaniak/dcfbb9c15eb575d24223577c17af4215 to your computer and use it in GitHub Desktop.
Save s-urbaniak/dcfbb9c15eb575d24223577c17af4215 to your computer and use it in GitHub Desktop.
#!/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