Created
January 25, 2023 16:32
-
-
Save duskvirkus/e7d924607ff76050d124a2ead70f9ef9 to your computer and use it in GitHub Desktop.
Revisions
-
duskvirkus created this gist
Jan 25, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,36 @@ #!/bin/bash # Installs s5cmd if command -v s5cmd &> /dev/null then echo "s5cmd is already installed" exit 0 fi START_DIR=$(pwd) if [ $(id -u) != 0 ]; then echo "this script must be run using sudo" echo "" echo "usage:" echo "sudo "$0 exit $exit_code exit 1 fi # wget installed ? if ! command -v wget &> /dev/null then echo "curl could not be found, installing" apt install -y wget fi TMP_DIR=$(mktemp -d -t ci-XXXXXXXXXX) cd $TMP_DIR wget "https://github.com/peak/s5cmd/releases/download/v2.0.0/s5cmd_2.0.0_Linux-64bit.tar.gz" tar -xf s5cmd_2.0.0_Linux-64bit.tar.gz mv s5cmd /usr/local/bin cd $START_DIR rm -rf $TMP_DIR