etcd: fix update script

This commit is contained in:
superherointj 2024-04-01 11:12:52 -03:00
parent 0b1fa3a2a1
commit 94e7d0dd01

View File

@ -3,11 +3,10 @@
set -x -eu -o pipefail
ETCD_VERSION_MAJOR_MINOR=`basename "$PWD"`
ETCD_PATH="$(dirname "$0")"
ETCD_VERSION_MAJOR_MINOR="$(basename $ETCD_PATH)"
ETCD_PKG_NAME=etcd_$(echo $ETCD_VERSION_MAJOR_MINOR | sed 's/[.]/_/g')
NIXPKGS_PATH="$(git rev-parse --show-toplevel)"
ETCD_PATH="$(dirname "$0")"
OLD_VERSION="$(nix-instantiate --eval -E "with import $NIXPKGS_PATH {}; \
$ETCD_PKG_NAME.version or (builtins.parseDrvName $ETCD_PKG_NAME.name).version" | tr -d '"')"