PortValhalla/scripts/Common/Software/Woodpecker CLI/install.sh

24 lines
658 B
Bash
Raw Normal View History

#!/bin/bash
# Elevate script
if [ ! "$UID" -eq 0 ]
then
sudo bash "$BASH_SOURCE";
else
2023-01-23 15:11:51 +00:00
contextRoot="$(mktemp -d)";
2023-03-16 19:17:15 +00:00
pushd "$contextRoot" > /dev/null;
# Preview from docker container
# container_id="$(docker create woodpeckerci/woodpecker-cli:next)"
# docker cp $container_id:/bin/woodpecker-cli /usr/local/bin/woodpecker-cli
# Latest from GitHub
wget https://github.com/woodpecker-ci/woodpecker/releases/download/v0.15.5/woodpecker-cli_linux_amd64.tar.gz \
-O woodpecker-cli.tar.gz;
tar -xvzf woodpecker-cli.tar.gz;
install woodpecker-cli /usr/local/bin;
popd > /dev/null;
2023-01-23 15:11:51 +00:00
rm -rf "$contextRoot";
fi