Skip to content

Instantly share code, notes, and snippets.

@neowulf
Last active August 5, 2025 17:09
Show Gist options
  • Select an option

  • Save neowulf/45d113a2711114a3aa79926e78e9deab to your computer and use it in GitHub Desktop.

Select an option

Save neowulf/45d113a2711114a3aa79926e78e9deab to your computer and use it in GitHub Desktop.
Bash Template
# curl
echo 'installing kubectl' && \
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
chmod +x kubectl && \
mv kubectl /usr/local/bin
# wget and copy
RUN echo 'installing jq' && \
wget -q -O /usr/bin/jq https://github.com/jqlang/jq/releases/download/${JQ_VERSION}/jq-linux-amd64 && \
chmod +x /usr/bin/jq
# curl and copy
RUN echo 'installing imgpkg' && \
curl -Lo /usr/bin/imgpkg https://github.com/carvel-dev/imgpkg/releases/latest/download/imgpkg-linux-amd64 && \
chmod +x /usr/bin/imgpkg
# wget with tar
echo 'installing docker' && \
wget -qO- https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_CLI_VERSION}.tgz | tar -xzv -C /tmp && \
mv /tmp/docker/* /usr/bin && \
chmod +x /usr/bin/docker
#!/usr/bin/env bash
set -eou pipefail
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
PROJECT_DIR=$(git rev-parse --show-toplevel)
function task() {
}
## process specific command and exit
args=("$@")
if ((${#args[@]})); then
"$@"
exit $?
fi
# if no specific command passed, process default commands
task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment