24 lines
661 B
Bash
Executable file
24 lines
661 B
Bash
Executable file
#!/bin/bash
|
|
# Elevate script
|
|
if [ ! "$UID" -eq 0 ]
|
|
then
|
|
sudo bash "$BASH_SOURCE"
|
|
else
|
|
workingDirectory=$(pwd)
|
|
contextRoot=$(mktemp -d)
|
|
cd $contextRoot
|
|
|
|
# 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
|
|
|
|
cd $workingDirectory
|
|
rm -rf $contextRoot
|
|
fi
|