From 8400468b93e1e12ec0fb15fcfada7aafaac11669 Mon Sep 17 00:00:00 2001 From: James Saryerwinnie Date: Sun, 25 Nov 2018 19:54:16 -0800 Subject: [PATCH] Copy ac index over to cache dir on postinstall --- macpkg/scripts/postinstall | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/macpkg/scripts/postinstall b/macpkg/scripts/postinstall index 7ba4edc219b3..2afc7001b187 100755 --- a/macpkg/scripts/postinstall +++ b/macpkg/scripts/postinstall @@ -1,5 +1,8 @@ #!/usr/bin/env bash sudo mkdir -p /usr/local/bin - sudo ln -sf /usr/local/aws/aws /usr/local/bin/aws sudo ln -sf /usr/local/aws/aws_completer /usr/local/bin/aws_completer + +CLI_VERSION=$(/usr/local/bin/aws --version | cut -d' ' -f 1 | cut -d'/' -f 2) +mkdir -p ~/.aws/cli/cache +cp /usr/local/aws/awscli/data/ac.index ~/.aws/cli/cache/$CLI_VERSION.index