k3s: update script fix #3
commit235dccbfff4fd3aa5462138d2d557ed4ab7dc6bc
authorsuperherointj <5861043+superherointj@users.noreply.github.com>
dateThu 14 Oct 2021, 15:07 (5 years ago)
parent0b32a42
pkgs/applications/networking/cluster/k3s/update.sh+2−2
@@ -1,7 +1,7 @@
11#!/usr/bin/env nix-shell
22#!nix-shell -i bash -p curl gnugrep gnused jq
33
4−set -eu -o pipefail
4+set -x -eu -o pipefail
55
66WORKDIR=$(mktemp -d)
77trap "rm -rf ${WORKDIR}" EXIT
@@ -45,7 +45,7 @@ CNIPLUGINS_SHA256=$(nix-prefetch-url --quiet --unpack \
4545 "https://github.com/rancher/plugins/archive/refs/tags/v${CNIPLUGINS_VERSION}.tar.gz")
4646
4747setKV () {
48− sed -i "s|$1 = \".*\"|$1 = \"$2\"|" ./default.nix
48+ sed -i "s|$1 = \".*\"|$1 = \"${2:-}\"|" ./default.nix
4949}
5050
5151setKV k3sVersion ${K3S_VERSION}