diff --git a/scripts/install.sh b/install.sh similarity index 82% rename from scripts/install.sh rename to install.sh index 2468cee..0041668 100755 --- a/scripts/install.sh +++ b/install.sh @@ -5,8 +5,11 @@ set -euf -o pipefail PLUGIN_VERSION=${PLUGIN_VERSION:-"0.1.0"} file="${HELM_PLUGIN_DIR:-"$(helm home)/plugins/helm-update-config"}/bin/helm-update-config" + +mkdir -p $(dirname ${file}) + os=$(uname -s | tr '[:upper:]' '[:lower:]') -url="https://github.com/burdiyan/helm-update-config/releases/download/v${PLUGIN_VERSION}/helm-edit_${os}_amd64" +url="https://github.com/burdiyan/helm-update-config/releases/download/v${PLUGIN_VERSION}/helm-update-config_${os}_amd64" if command -v wget; then wget -O "${file}" "${url}" diff --git a/plugin.yaml b/plugin.yaml index c3fa2be..2c85fc7 100644 --- a/plugin.yaml +++ b/plugin.yaml @@ -6,4 +6,4 @@ ignoreFlags: false useTunnel: true command: "$HELM_PLUGIN_DIR/bin/helm-update-config" hooks: - install: "$HELM_PLUGIN_DIR/scripts/install.sh" + install: "$HELM_PLUGIN_DIR/install.sh"