You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
598 B
Plaintext
21 lines
598 B
Plaintext
4 years ago
|
#!/usr/bin/env bash
|
||
|
|
||
|
# shellcheck disable=SC1090
|
||
|
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
||
|
|
||
|
APP=traefik
|
||
|
VERSION=${VERSION:-2.4.8}
|
||
|
DEST="${XDG_DATA_HOME}/apps/releases/${APP}"
|
||
|
|
||
|
URL=https://github.com/traefik/traefik/releases/download/v${VERSION}/traefik_v${VERSION}_$(get_os)_$(get_arch).tar.gz
|
||
|
extract_tarball "${URL}" "${DEST}/${VERSION}"
|
||
|
set_current_link "${DEST}" "${VERSION}"
|
||
|
|
||
|
if [[ -L "$XDG_BIN_HOME/${APP}" ]]; then
|
||
|
unlink "$XDG_BIN_HOME/${APP}"
|
||
|
fi
|
||
|
|
||
|
cd "$XDG_BIN_HOME" || exit 1
|
||
|
REL_LINK="$(relative_path "${XDG_BIN_HOME}" "${DEST}/current/${APP}")"
|
||
|
ln -s "${REL_LINK}" ${APP}
|