File: setup-etcd-env.sh

package info (click to toggle)
python-taskflow 5.12.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,564 kB
  • sloc: python: 28,241; sh: 269; makefile: 24
file content (31 lines) | stat: -rwxr-xr-x 725 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
set -eux
if [ -z "$(which etcd)" ]; then
    ETCD_VERSION=3.4.27
    case `uname -s` in
        Darwin)
            OS=darwin
            SUFFIX=zip
            ;;
        Linux)
            OS=linux
            SUFFIX=tar.gz
            ;;
        *)
            echo "Unsupported OS"
            exit 1
    esac
    case `uname -m` in
         x86_64)
             MACHINE=amd64
             ;;
         *)
            echo "Unsupported machine"
            exit 1
    esac
    TARBALL_NAME=etcd-v${ETCD_VERSION}-$OS-$MACHINE
    test ! -d "$TARBALL_NAME" && curl -L https://github.com/coreos/etcd/releases/download/v${ETCD_VERSION}/${TARBALL_NAME}.${SUFFIX} | tar xz
    export PATH=$PATH:$TARBALL_NAME
fi

$*