Update shell script styles and update versions
parent
c9004e963e
commit
5f5e995fbd
@ -1,21 +1,31 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# shellcheck disable=SC1090
|
set -euo pipefail
|
||||||
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
|
||||||
|
|
||||||
get_arch () {
|
|
||||||
case $(uname -m) in
|
|
||||||
x86_64*) echo amd64;;
|
|
||||||
*) >&2 echo "unsupported architecture: $(uname -m)"; exit 1;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
|
# shellcheck disable=SC1091
|
||||||
|
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
||||||
|
|
||||||
APP=cmctl
|
APP=cmctl
|
||||||
VERSION=${VERSION:-1.6.1}
|
VERSION=${VERSION:-1.6.1}
|
||||||
DEST="${XDG_DATA_HOME}/apps/releases/${APP}"
|
DEST=${XDG_DATA_HOME}/apps/releases/${APP}
|
||||||
URL=https://github.com/jetstack/cert-manager/releases/download/v${VERSION}/cmctl-$(get_os)-$(get_arch).tar.gz
|
|
||||||
|
main() (
|
||||||
|
set -x
|
||||||
|
URL=https://github.com/cert-manager/cert-manager/releases/download/v${VERSION}/cmctl-$(get_os)-$(get_arch).tar.gz
|
||||||
|
|
||||||
|
extract_tarball "${URL}" "${DEST}/${VERSION}"
|
||||||
|
set_current_link "${DEST}" "${VERSION}"
|
||||||
|
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}"
|
||||||
|
)
|
||||||
|
|
||||||
|
get_arch() (
|
||||||
|
case $(uname -m) in
|
||||||
|
x86_64*) echo amd64 ;;
|
||||||
|
*)
|
||||||
|
echo >&2 "unsupported architecture: $(uname -m)"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
)
|
||||||
|
|
||||||
extract_tarball "${URL}" "${DEST}/${VERSION}"
|
main "${@}"
|
||||||
set_current_link "${DEST}" "${VERSION}"
|
|
||||||
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}"
|
|
||||||
|
@ -1,24 +1,34 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# shellcheck disable=SC1090
|
set -euo pipefail
|
||||||
|
|
||||||
|
# shellcheck disable=SC1091
|
||||||
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
||||||
|
|
||||||
get_arch () {
|
APP=chezmoi
|
||||||
|
VERSION=${VERSION:-2.33.6}
|
||||||
|
DEST=${XDG_DATA_HOME}/apps/releases/${APP}
|
||||||
|
|
||||||
|
main() (
|
||||||
|
URL=https://github.com/twpayne/chezmoi/releases/download/v${VERSION}/chezmoi_${VERSION}_$(get_os)_$(get_arch).tar.gz
|
||||||
|
|
||||||
|
extract_tarball "${URL}" "${DEST}/${VERSION}"
|
||||||
|
set_current_link "${DEST}" "${VERSION}"
|
||||||
|
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}"
|
||||||
|
set_link "${XDG_CONFIG_HOME}/bash/bashrc.d/chezmoi.sh" "${DEST}" "completions/chezmoi-completion.bash"
|
||||||
|
set_link "${XDG_CONFIG_HOME}/zsh/zshrc.d/chezmoi.zsh" "${DEST}" "completions/chezmoi.zsh"
|
||||||
|
set_link "${XDG_CONFIG_HOME}/fish/completions/chezmoi.fish" "${DEST}" "completions/chezmoi.fish"
|
||||||
|
set_link "${XDG_DATA_HOME}/doc/chezmoi" "${DEST}" "docs"
|
||||||
|
)
|
||||||
|
|
||||||
|
get_arch() (
|
||||||
case $(uname -m) in
|
case $(uname -m) in
|
||||||
x86_64*) echo amd64;;
|
x86_64*) echo amd64 ;;
|
||||||
*) >&2 echo "unsupported architecture: $(uname -m)"; exit 1;;
|
*)
|
||||||
|
echo >&2 "unsupported architecture: $(uname -m)"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
)
|
||||||
|
|
||||||
APP=chezmoi
|
|
||||||
VERSION=${VERSION:-2.22.1}
|
|
||||||
DEST="${XDG_DATA_HOME}/apps/releases/${APP}"
|
|
||||||
URL=https://github.com/twpayne/chezmoi/releases/download/v${VERSION}/chezmoi_${VERSION}_$(get_os)_$(get_arch).tar.gz
|
|
||||||
|
|
||||||
extract_tarball "${URL}" "${DEST}/${VERSION}"
|
main "${@}"
|
||||||
set_current_link "${DEST}" "${VERSION}"
|
|
||||||
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}"
|
|
||||||
set_link "${XDG_CONFIG_HOME}/bash/bashrc.d/chezmoi.sh" "${DEST}" "completions/chezmoi-completion.bash"
|
|
||||||
set_link "${XDG_CONFIG_HOME}/zsh/zshrc.d/chezmoi.zsh" "${DEST}" "completions/chezmoi.zsh"
|
|
||||||
set_link "${XDG_CONFIG_HOME}/fish/completions/chezmoi.fish" "${DEST}" "completions/chezmoi.fish"
|
|
||||||
set_link "${XDG_DATA_HOME}/doc/chezmoi" "${DEST}" "docs"
|
|
||||||
|
@ -1,22 +1,32 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# shellcheck disable=SC1090
|
set -euo pipefail
|
||||||
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
|
||||||
|
|
||||||
get_arch () (
|
# shellcheck disable=SC1091
|
||||||
case $(uname -m) in
|
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
||||||
x86_64*) echo amd64;;
|
|
||||||
*) >&2 echo "unsupported architecture: $(uname -m)"; exit 1;;
|
|
||||||
esac
|
|
||||||
)
|
|
||||||
|
|
||||||
APP=dasel
|
APP=dasel
|
||||||
VERSION=${VERSION:-2.2.0}
|
VERSION=${VERSION:-2.2.0}
|
||||||
DEST=${XDG_DATA_HOME}/apps/releases/${APP}
|
DEST=${XDG_DATA_HOME}/apps/releases/${APP}
|
||||||
URL=https://github.com/TomWright/dasel/releases/download/v${VERSION}/dasel_$(get_os)_$(get_arch)
|
|
||||||
|
|
||||||
mkdir_if_missing "${DEST}/${VERSION}"
|
main() (
|
||||||
curl --silent --location --output "${DEST}/${VERSION}/dasel" "${URL}"
|
URL=https://github.com/TomWright/dasel/releases/download/v${VERSION}/dasel_$(get_os)_$(get_arch)
|
||||||
chmod 755 "${DEST}/${VERSION}/dasel"
|
|
||||||
set_current_link "${DEST}" "${VERSION}"
|
mkdir_if_missing "${DEST}/${VERSION}"
|
||||||
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}"
|
curl --silent --location --output "${DEST}/${VERSION}/dasel" "${URL}"
|
||||||
|
chmod 755 "${DEST}/${VERSION}/dasel"
|
||||||
|
set_current_link "${DEST}" "${VERSION}"
|
||||||
|
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}"
|
||||||
|
)
|
||||||
|
|
||||||
|
get_arch() (
|
||||||
|
case $(uname -m) in
|
||||||
|
x86_64*) echo amd64 ;;
|
||||||
|
*)
|
||||||
|
echo >&2 "unsupported architecture: $(uname -m)"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
)
|
||||||
|
|
||||||
|
main "${@}"
|
||||||
|
@ -1,20 +1,31 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# shellcheck disable=SC1091
|
||||||
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
||||||
|
|
||||||
function get_os () {
|
APP=dust
|
||||||
|
VERSION=${VERSION:-0.8.6}
|
||||||
|
DEST=${XDG_DATA_HOME}/apps/releases/${APP}
|
||||||
|
|
||||||
|
main() (
|
||||||
|
URL=https://github.com/bootandy/dust/releases/download/v${VERSION}/dust-v${VERSION}-$(uname -m)-$(get_os).tar.gz
|
||||||
|
|
||||||
|
extract_tarball "${URL}" "${DEST}/${VERSION}" "--strip-component 1"
|
||||||
|
set_current_link "${DEST}" "${VERSION}"
|
||||||
|
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}"
|
||||||
|
)
|
||||||
|
|
||||||
|
get_os() (
|
||||||
case $(uname -s) in
|
case $(uname -s) in
|
||||||
Linux*) echo unknown-linux-gnu;;
|
Linux*) echo unknown-linux-gnu ;;
|
||||||
Darwin*) echo apple-darwin;;
|
Darwin*) echo apple-darwin ;;
|
||||||
*) >&2 echo "unsupported os: $(uname -s)"; exit 1;;
|
*)
|
||||||
|
echo >&2 "unsupported os: $(uname -s)"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
)
|
||||||
|
|
||||||
APP=dust
|
|
||||||
VERSION=${VERSION:-0.6.2}
|
|
||||||
DEST="${XDG_DATA_HOME}/apps/releases/${APP}"
|
|
||||||
URL="https://github.com/bootandy/dust/releases/download/v${VERSION}/dust-v${VERSION}-$(uname -m)-$(get_os).tar.gz"
|
|
||||||
|
|
||||||
extract_tarball "${URL}" "${DEST}/${VERSION}" "--strip-component 1"
|
main "${@}"
|
||||||
set_current_link "${DEST}" "${VERSION}"
|
|
||||||
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}"
|
|
||||||
|
@ -1,22 +1,30 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -euo pipefail
|
||||||
|
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1091
|
||||||
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
||||||
|
|
||||||
get_arch () {
|
APP=evans
|
||||||
|
VERSION=${VERSION:-v0.10.11}
|
||||||
|
DEST=${XDG_DATA_HOME}/apps/releases/${APP}
|
||||||
|
|
||||||
|
main() (
|
||||||
|
URL=https://github.com/ktr0731/evans/releases/download/${VERSION}/evans_$(get_os)_$(get_arch).tar.gz
|
||||||
|
|
||||||
|
extract_tarball "${URL}" "${DEST}/${VERSION}"
|
||||||
|
set_current_link "${DEST}" "${VERSION}"
|
||||||
|
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}"
|
||||||
|
)
|
||||||
|
|
||||||
|
get_arch() (
|
||||||
case $(uname -m) in
|
case $(uname -m) in
|
||||||
x86_64*) echo amd64;;
|
x86_64*) echo amd64 ;;
|
||||||
*) >&2 echo "unsupported architecture: $(uname -m)"; exit 1;;
|
*)
|
||||||
|
echo >&2 "unsupported architecture: $(uname -m)"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
)
|
||||||
|
|
||||||
APP=evans
|
|
||||||
VERSION=${VERSION:-0.10.2}
|
|
||||||
DEST="${XDG_DATA_HOME}/apps/releases/${APP}"
|
|
||||||
URL=https://github.com/ktr0731/evans/releases/download/${VERSION}/evans_$(get_os)_$(get_arch).tar.gz
|
|
||||||
|
|
||||||
extract_tarball "${URL}" "${DEST}/${VERSION}"
|
main "${@}"
|
||||||
set_current_link "${DEST}" "${VERSION}"
|
|
||||||
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}"
|
|
||||||
|
@ -1,20 +1,31 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
set -euo pipefail
|
||||||
|
|
||||||
function get_os () {
|
# shellcheck disable=SC1091
|
||||||
case $(uname -s) in
|
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
||||||
Linux*) echo linux;;
|
|
||||||
Darwin*) echo macOS;;
|
|
||||||
*) >&2 echo "unsupported os: $(uname -s)"; exit 1;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
APP=gotemplate
|
APP=gotemplate
|
||||||
VERSION=${VERSION:-3.7.0}
|
VERSION=${VERSION:-3.7.2}
|
||||||
DEST="${XDG_DATA_HOME}/apps/releases/${APP}"
|
DEST="${XDG_DATA_HOME}/apps/releases/${APP}"
|
||||||
URL=https://github.com/coveooss/gotemplate/releases/download/v${VERSION}/gotemplate_${VERSION}_$(get_os)_64-bits.zip
|
|
||||||
|
|
||||||
extract_zip "${URL}" "${DEST}/${VERSION}"
|
main() (
|
||||||
set_current_link "${DEST}" "${VERSION}"
|
URL=https://github.com/coveooss/gotemplate/releases/download/v${VERSION}/gotemplate_${VERSION}_$(get_os)_64-bits.zip
|
||||||
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}"
|
|
||||||
|
extract_zip "${URL}" "${DEST}/${VERSION}"
|
||||||
|
set_current_link "${DEST}" "${VERSION}"
|
||||||
|
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}"
|
||||||
|
)
|
||||||
|
|
||||||
|
get_os() (
|
||||||
|
case $(uname -s) in
|
||||||
|
Linux*) echo linux ;;
|
||||||
|
Darwin*) echo macOS ;;
|
||||||
|
*)
|
||||||
|
echo >&2 "unsupported os: $(uname -s)"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
)
|
||||||
|
|
||||||
|
main "${@}"
|
||||||
|
@ -1,20 +1,30 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# shellcheck disable=SC1090
|
set -euo pipefail
|
||||||
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
|
||||||
|
|
||||||
get_arch () {
|
# shellcheck disable=SC1091
|
||||||
case $(uname -m) in
|
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
||||||
x86_64*) echo 64bit;;
|
|
||||||
*) >&2 echo "unsupported architecture: $(uname -m)"; exit 1;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
APP=hugo
|
APP=hugo
|
||||||
VERSION=${VERSION:-0.88.1}
|
VERSION=${VERSION:-0.111.3}
|
||||||
DEST="${XDG_DATA_HOME}/apps/releases/${APP}"
|
DEST="${XDG_DATA_HOME}/apps/releases/${APP}"
|
||||||
URL=https://github.com/gohugoio/hugo/releases/download/v${VERSION}/hugo_extended_${VERSION}_$(uname)-$(get_arch).tar.gz
|
|
||||||
|
|
||||||
extract_tarball "${URL}" "${DEST}/${VERSION}"
|
main() (
|
||||||
set_current_link "${DEST}" "${VERSION}"
|
URL=https://github.com/gohugoio/hugo/releases/download/v${VERSION}/hugo_extended_${VERSION}_$(uname)-$(get_arch).tar.gz
|
||||||
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}"
|
|
||||||
|
extract_tarball "${URL}" "${DEST}/${VERSION}"
|
||||||
|
set_current_link "${DEST}" "${VERSION}"
|
||||||
|
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}"
|
||||||
|
)
|
||||||
|
|
||||||
|
get_arch() (
|
||||||
|
case $(uname -m) in
|
||||||
|
x86_64*) echo 64bit ;;
|
||||||
|
*)
|
||||||
|
echo >&2 "unsupported architecture: $(uname -m)"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
)
|
||||||
|
|
||||||
|
main "${@}"
|
||||||
|
@ -1,30 +1,37 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# shellcheck disable=SC1090
|
set -euo pipefail
|
||||||
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
get_arch () {
|
# shellcheck disable=SC1091
|
||||||
case $(uname -m) in
|
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
||||||
x86_64*) echo amd64;;
|
|
||||||
arm64*) echo arm64;;
|
|
||||||
*) >&2 echo "unsupported architecture: $(uname -m)"; exit 1;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
APP=kubectl
|
APP=kubectl
|
||||||
# https://dl.k8s.io/release/stable.txt
|
# https://dl.k8s.io/release/stable.txt
|
||||||
VERSION=${VERSION:-1.26.1}
|
VERSION=${VERSION:-1.26.1}
|
||||||
DEST=${XDG_DATA_HOME}/apps/releases/${APP}
|
DEST=${XDG_DATA_HOME}/apps/releases/${APP}
|
||||||
URL=https://dl.k8s.io/release/v${VERSION}/bin/$(get_os)/$(get_arch)/kubectl
|
|
||||||
|
|
||||||
APP_PATH=${DEST}/${VERSION}/kubectl
|
APP_PATH=${DEST}/${VERSION}/kubectl
|
||||||
if [[ ! -f "${APP_PATH}" ]]; then
|
|
||||||
|
main() (
|
||||||
|
URL=https://dl.k8s.io/release/v${VERSION}/bin/$(get_os)/$(get_arch)/kubectl
|
||||||
|
if [[ ! -f ${APP_PATH} ]]; then
|
||||||
mkdir -p "${DEST}/${VERSION}"
|
mkdir -p "${DEST}/${VERSION}"
|
||||||
curl --silent --location --output "${APP_PATH}" "${URL}"
|
curl --silent --location --output "${APP_PATH}" "${URL}"
|
||||||
chmod +x "${APP_PATH}"
|
chmod +x "${APP_PATH}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
set_current_link "${DEST}" "${VERSION}"
|
||||||
|
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}"
|
||||||
|
)
|
||||||
|
|
||||||
|
get_arch() (
|
||||||
|
case $(uname -m) in
|
||||||
|
x86_64*) echo amd64 ;;
|
||||||
|
arm64*) echo arm64 ;;
|
||||||
|
*)
|
||||||
|
echo >&2 "unsupported architecture: $(uname -m)"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
)
|
||||||
|
|
||||||
set_current_link "${DEST}" "${VERSION}"
|
main "${@}"
|
||||||
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}"
|
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -euo pipefail
|
||||||
|
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1091
|
||||||
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
||||||
|
|
||||||
APP=minikube
|
APP=minikube
|
||||||
VERSION=${VERSION:-1.25.2}
|
VERSION=${VERSION:-1.30.1}
|
||||||
DEST=${XDG_DATA_HOME}/apps/releases/${APP}
|
DEST=${XDG_DATA_HOME}/apps/releases/${APP}
|
||||||
URL=https://github.com/kubernetes/minikube/releases/download/v${VERSION}/minikube-$(get_os)-$(get_arch).tar.gz
|
URL=https://github.com/kubernetes/minikube/releases/download/v${VERSION}/minikube-$(get_os)-$(get_arch).tar.gz
|
||||||
|
|
||||||
extract_tarball "${URL}" "${DEST}/${VERSION}" "--strip-components 1"
|
extract_tarball "${URL}" "${DEST}/${VERSION}" "--strip-components 1"
|
||||||
set_current_link "${DEST}" "${VERSION}"
|
set_current_link "${DEST}" "${VERSION}"
|
||||||
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" minikube-$(get_os)-$(get_arch)
|
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "minikube-$(get_os)-$(get_arch)"
|
||||||
set_link "${XDG_BIN_HOME}/docker-machine-driver-kvm2" "${DEST}" docker-machine-driver-kvm2
|
set_link "${XDG_BIN_HOME}/docker-machine-driver-kvm2" "${DEST}" docker-machine-driver-kvm2
|
||||||
|
@ -1,20 +1,32 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# shellcheck disable=SC1091
|
||||||
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
||||||
|
|
||||||
function get_os () (
|
APP=procs
|
||||||
|
VERSION=${VERSION:-0.14.0}
|
||||||
|
DEST=${XDG_DATA_HOME}/apps/releases/${APP}
|
||||||
|
|
||||||
|
main() (
|
||||||
|
set -x
|
||||||
|
URL=https://github.com/dalance/procs/releases/download/v${VERSION}/procs-v${VERSION}-$(uname -m)-$(get_os).zip
|
||||||
|
|
||||||
|
extract_zip "${URL}" "${DEST}/${VERSION}"
|
||||||
|
set_current_link "${DEST}" "${VERSION}"
|
||||||
|
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}"
|
||||||
|
)
|
||||||
|
|
||||||
|
get_os() (
|
||||||
case $(uname -s) in
|
case $(uname -s) in
|
||||||
Linux*) echo lnx;;
|
Linux*) echo linux ;;
|
||||||
Darwin*) echo mac;;
|
Darwin*) echo mac ;;
|
||||||
*) >&2 echo "unsupported os: $(uname -s)"; exit 1;;
|
*)
|
||||||
|
echo >&2 "unsupported os: $(uname -s)"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
)
|
)
|
||||||
|
|
||||||
APP=procs
|
main "${@}"
|
||||||
VERSION=${VERSION:-0.12.0}
|
|
||||||
DEST=${XDG_DATA_HOME}/apps/releases/${APP}
|
|
||||||
URL=https://github.com/dalance/procs/releases/download/v${VERSION}/procs-v${VERSION}-$(uname -m)-$(get_os).zip
|
|
||||||
|
|
||||||
extract_zip "${URL}" "${DEST}/${VERSION}"
|
|
||||||
set_current_link "${DEST}" "${VERSION}"
|
|
||||||
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}"
|
|
||||||
|
@ -1,59 +1,66 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -euo pipefail
|
||||||
|
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1091
|
||||||
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
||||||
|
|
||||||
get_os () (
|
VERSION=${VERSION:-23.1}
|
||||||
case $(uname -s) in
|
|
||||||
Linux*) echo linux;;
|
|
||||||
Darwin*) echo osx;;
|
|
||||||
*) >&2 echo "unsupported os"; return;
|
|
||||||
esac
|
|
||||||
)
|
|
||||||
|
|
||||||
get_arch () (
|
|
||||||
uname -m
|
|
||||||
)
|
|
||||||
|
|
||||||
VERSION=${VERSION:-22.3}
|
|
||||||
APP=protoc
|
APP=protoc
|
||||||
APPS_DIR=${XDG_DATA_HOME}/apps/releases/${APP}
|
APPS_DIR=${XDG_DATA_HOME}/apps/releases/${APP}
|
||||||
VER_DIR=${APPS_DIR}/${VERSION}
|
VER_DIR=${APPS_DIR}/${VERSION}
|
||||||
|
|
||||||
ZIP=protoc-${VERSION}-$(get_os)-$(get_arch).zip
|
main() (
|
||||||
TMP_DIR=$(mktemp -d)
|
ZIP=protoc-${VERSION}-$(get_os)-$(get_arch).zip
|
||||||
DEST_FILE=$TMP_DIR/$ZIP
|
TMP_DIR=$(mktemp -d)
|
||||||
URL=https://github.com/protocolbuffers/protobuf/releases/download/v${VERSION}/${ZIP}
|
DEST_FILE=$TMP_DIR/$ZIP
|
||||||
|
URL=https://github.com/protocolbuffers/protobuf/releases/download/v${VERSION}/${ZIP}
|
||||||
|
|
||||||
if [[ ! -d "${VER_DIR}" ]]; then
|
if [[ ! -d ${VER_DIR} ]]; then
|
||||||
curl --output "${DEST_FILE}" --location "${URL}"
|
curl --output "${DEST_FILE}" --location "${URL}"
|
||||||
mkdir -p "${VER_DIR}"
|
mkdir -p "${VER_DIR}"
|
||||||
unzip -o "${DEST_FILE}" -d "${VER_DIR}"
|
unzip -o "${DEST_FILE}" -d "${VER_DIR}"
|
||||||
find "${VER_DIR}" -type f -exec chmod 644 {} \;
|
find "${VER_DIR}" -type f -exec chmod 644 {} \;
|
||||||
find "${VER_DIR}" -type d -exec chmod 755 {} \;
|
find "${VER_DIR}" -type d -exec chmod 755 {} \;
|
||||||
find "${VER_DIR}/bin" -type f -exec chmod 755 {} \;
|
find "${VER_DIR}/bin" -type f -exec chmod 755 {} \;
|
||||||
fi
|
fi
|
||||||
rm -rfv "$TMP_DIR"
|
rm -rfv "$TMP_DIR"
|
||||||
|
|
||||||
set_current_link "${APPS_DIR}" "${VERSION}"
|
set_current_link "${APPS_DIR}" "${VERSION}"
|
||||||
|
|
||||||
apps=$(find "${APPS_DIR}/current/bin" -maxdepth 1 -type f -exec basename {} \;)
|
apps=$(find "${APPS_DIR}/current/bin" -maxdepth 1 -type f -exec basename {} \;)
|
||||||
pushd "${XDG_BIN_HOME}"
|
pushd "${XDG_BIN_HOME}"
|
||||||
for bin in $apps; do
|
for bin in $apps; do
|
||||||
if [[ ! -s $bin ]]; then
|
if [[ ! -s $bin ]]; then
|
||||||
ln -s \
|
ln -s \
|
||||||
"$(relative_path "${XDG_BIN_HOME}" "${APPS_DIR}/current/bin/${bin}")" \
|
"$(relative_path "${XDG_BIN_HOME}" "${APPS_DIR}/current/bin/${bin}")" \
|
||||||
"${bin}"
|
"${bin}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
popd
|
popd
|
||||||
|
|
||||||
pushd "${XDG_INCLUDE_HOME}"
|
pushd "${XDG_INCLUDE_HOME}"
|
||||||
if [[ ! -s google ]]; then
|
if [[ ! -s google ]]; then
|
||||||
ln -s \
|
ln -s \
|
||||||
"$(relative_path "${XDG_INCLUDE_HOME}" "${APPS_DIR}/current/include/google")" \
|
"$(relative_path "${XDG_INCLUDE_HOME}" "${APPS_DIR}/current/include/google")" \
|
||||||
google
|
google
|
||||||
fi
|
fi
|
||||||
popd
|
popd
|
||||||
|
)
|
||||||
|
|
||||||
|
get_os() (
|
||||||
|
case $(uname -s) in
|
||||||
|
Linux*) echo linux ;;
|
||||||
|
Darwin*) echo osx ;;
|
||||||
|
*)
|
||||||
|
echo >&2 "unsupported os"
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
)
|
||||||
|
|
||||||
|
get_arch() (
|
||||||
|
uname -m
|
||||||
|
)
|
||||||
|
|
||||||
|
main "${@}"
|
||||||
|
@ -1,22 +1,32 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# shellcheck disable=SC1090
|
set -euo pipefail
|
||||||
|
|
||||||
|
# shellcheck disable=SC1091
|
||||||
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
||||||
|
|
||||||
get_arch () {
|
APP=shfmt
|
||||||
|
VERSION=${VERSION:-3.6.0}
|
||||||
|
DEST=${XDG_DATA_HOME}/apps/releases/${APP}
|
||||||
|
|
||||||
|
main() (
|
||||||
|
URL=https://github.com/mvdan/sh/releases/download/v${VERSION}/shfmt_v${VERSION}_$(get_os)_$(get_arch)
|
||||||
|
|
||||||
|
mkdir_if_missing "${DEST}/${VERSION}"
|
||||||
|
curl --silent --location --output "${DEST}/${VERSION}/${APP}" "${URL}"
|
||||||
|
chmod 755 "${DEST}/${VERSION}/${APP}"
|
||||||
|
set_current_link "${DEST}" "${VERSION}"
|
||||||
|
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}"
|
||||||
|
)
|
||||||
|
|
||||||
|
get_arch() (
|
||||||
case $(uname -m) in
|
case $(uname -m) in
|
||||||
x86_64*) echo amd64;;
|
x86_64*) echo amd64 ;;
|
||||||
*) >&2 echo "unsupported architecture: $(uname -m)"; exit 1;;
|
*)
|
||||||
|
echo >&2 "unsupported architecture: $(uname -m)"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
)
|
||||||
|
|
||||||
APP=shfmt
|
|
||||||
VERSION=${VERSION:-3.3.1}
|
|
||||||
DEST="${XDG_DATA_HOME}/apps/releases/${APP}"
|
|
||||||
URL=https://github.com/mvdan/sh/releases/download/v${VERSION}/shfmt_v${VERSION}_$(get_os)_$(get_arch)
|
|
||||||
|
|
||||||
mkdir_if_missing "${DEST}/${VERSION}"
|
main "${@}"
|
||||||
curl --silent --location --output "${DEST}/${VERSION}/${APP}" "${URL}"
|
|
||||||
chmod 755 "${DEST}/${VERSION}/${APP}"
|
|
||||||
set_current_link "${DEST}" "${VERSION}"
|
|
||||||
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}"
|
|
||||||
|
@ -1,27 +1,37 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# shellcheck disable=SC1090
|
set -euo pipefail
|
||||||
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
|
||||||
|
|
||||||
get_arch () (
|
# shellcheck disable=SC1091
|
||||||
case $(uname -m) in
|
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
||||||
x86_64*) echo i686;;
|
|
||||||
amd64*) echo i686;;
|
|
||||||
i386*) echo i686;;
|
|
||||||
i686*) echo i686;;
|
|
||||||
arm) echo arm;;
|
|
||||||
aarch64*) echo aarch64;;
|
|
||||||
*) >&2 echo "unsupported architecture: $(uname -m)"; exit 1;;
|
|
||||||
esac
|
|
||||||
)
|
|
||||||
|
|
||||||
APP=ttyd
|
APP=ttyd
|
||||||
VERSION=${VERSION:-1.7.2}
|
VERSION=${VERSION:-1.7.2}
|
||||||
DEST=${XDG_DATA_HOME}/apps/releases/${APP}
|
DEST=${XDG_DATA_HOME}/apps/releases/${APP}
|
||||||
URL=https://github.com/tsl0922/ttyd/releases/download/${VERSION}/ttyd.$(get_arch)
|
|
||||||
|
|
||||||
mkdir_if_missing "${DEST}/${VERSION}"
|
main() (
|
||||||
curl --silent --location --output "${DEST}/${VERSION}/${APP}" "${URL}"
|
URL=https://github.com/tsl0922/ttyd/releases/download/${VERSION}/ttyd.$(get_arch)
|
||||||
chmod 755 "${DEST}/${VERSION}/${APP}"
|
|
||||||
set_current_link "${DEST}" "${VERSION}"
|
mkdir_if_missing "${DEST}/${VERSION}"
|
||||||
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}"
|
curl --silent --location --output "${DEST}/${VERSION}/${APP}" "${URL}"
|
||||||
|
chmod 755 "${DEST}/${VERSION}/${APP}"
|
||||||
|
set_current_link "${DEST}" "${VERSION}"
|
||||||
|
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}"
|
||||||
|
)
|
||||||
|
|
||||||
|
get_arch() (
|
||||||
|
case $(uname -m) in
|
||||||
|
x86_64*) echo i686 ;;
|
||||||
|
amd64*) echo i686 ;;
|
||||||
|
i386*) echo i686 ;;
|
||||||
|
i686*) echo i686 ;;
|
||||||
|
arm) echo arm ;;
|
||||||
|
aarch64*) echo aarch64 ;;
|
||||||
|
*)
|
||||||
|
echo >&2 "unsupported architecture: $(uname -m)"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
)
|
||||||
|
|
||||||
|
main "${@}"
|
||||||
|
@ -1,20 +1,30 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# shellcheck disable=SC1090
|
set -euo pipefail
|
||||||
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
|
||||||
|
|
||||||
get_arch () {
|
# shellcheck disable=SC1091
|
||||||
case $(uname -m) in
|
source "${XDG_DATA_HOME}/buddy-up/includes/utils.sh"
|
||||||
x86_64*) echo amd64;;
|
|
||||||
*) >&2 echo "unsupported architecture: $(uname -m)"; exit 1;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
APP=vegeta
|
APP=vegeta
|
||||||
VERSION=${VERSION:-12.8.4}
|
VERSION=${VERSION:-12.8.4}
|
||||||
DEST="${XDG_DATA_HOME}/apps/releases/${APP}"
|
DEST=${XDG_DATA_HOME}/apps/releases/${APP}
|
||||||
URL=https://github.com/tsenart/vegeta/releases/download/v${VERSION}/vegeta_${VERSION}_$(get_os)_$(get_arch).tar.gz
|
|
||||||
|
main() (
|
||||||
|
URL=https://github.com/tsenart/vegeta/releases/download/v${VERSION}/vegeta_${VERSION}_$(get_os)_$(get_arch).tar.gz
|
||||||
|
|
||||||
|
extract_tarball "${URL}" "${DEST}/${VERSION}"
|
||||||
|
set_current_link "${DEST}" "${VERSION}"
|
||||||
|
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}"
|
||||||
|
)
|
||||||
|
|
||||||
|
get_arch() (
|
||||||
|
case $(uname -m) in
|
||||||
|
x86_64*) echo amd64 ;;
|
||||||
|
*)
|
||||||
|
echo >&2 "unsupported architecture: $(uname -m)"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
)
|
||||||
|
|
||||||
extract_tarball "${URL}" "${DEST}/${VERSION}"
|
main "${@}"
|
||||||
set_current_link "${DEST}" "${VERSION}"
|
|
||||||
set_link "${XDG_BIN_HOME}/${APP}" "${DEST}" "${APP}"
|
|
||||||
|
Loading…
Reference in New Issue