Index: head/net/google-cloud-sdk/Makefile =================================================================== --- head/net/google-cloud-sdk/Makefile +++ head/net/google-cloud-sdk/Makefile @@ -2,6 +2,7 @@ PORTNAME= google-cloud-sdk PORTVERSION= 321.0.0 +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/ DISTNAME= google-cloud-sdk-${PORTVERSION}-linux-x86_64 @@ -26,6 +27,12 @@ bin/git-credential-gcloud.sh \ bin/gsutil +OPTIONS_DEFINE= BASH ZSH +OPTIONS_DEFAULT= BASH ZSH + +BASH_PLIST_FILES= share/bash-completion/completions/gcloud +ZSH_PLIST_FILES= share/zsh/site-functions/_gcloud + post-extract: @${RM} -r \ ${WRKSRC}/bin/anthoscli \ @@ -52,5 +59,15 @@ post-install: @(cd ${STAGEDIR}${PREFIX} && \ ${FIND} -s google-cloud-sdk -type f -o -type l >> ${TMPPLIST}) + +post-install-BASH-on: + @${MKDIR} ${STAGEDIR}${PREFIX}/share/bash-completion/completions + ${RLN} ${STAGEDIR}${PREFIX}/google-cloud-sdk/completion.bash.inc \ + ${STAGEDIR}${PREFIX}/share/bash-completion/completions/gcloud + +post-install-ZSH-on: + @${MKDIR} ${STAGEDIR}${PREFIX}/share/zsh/site-functions + ${RLN} ${STAGEDIR}${PREFIX}/google-cloud-sdk/completion.zsh.inc \ + ${STAGEDIR}${PREFIX}/share/zsh/site-functions/_gcloud .include