drone script fixes
continuous-integration/drone/push Build is passing Details

production
Override-6 2 years ago
parent 78ca85eaff
commit 81abb03b8a

@ -1,11 +1,20 @@
#!/usr/bin/env bash #!/usr/bin/env bash
#use the right command to install packages
if [ "$(command -v apt)" ]; then CMD=apt; else CMD=yum; fi
echo "installing packages..." echo "installing packages..."
eval $CMD update > /dev/null #use the right command to install packages
eval $CMD -y install openssh-client openssh-clients > /dev/null if [ "$(command -v apt)" ]; then
apt update > /dev/null
apt -y install openssh-client openssh-clients > /dev/null
elif [ "$(command -v yum)" ]; then
yum update > /dev/null
yum -y install openssh-client openssh-clients > /dev/null
elif [ "$(command -v apk)" ]; then
apk update > /dev/null
apk add openssh-client openssh-clients > /dev/null
else
echo "could not find a package manager, anborting" >&2
exit 1
fi
echo "done." echo "done."
mkdir /root/.ssh mkdir /root/.ssh