chore: selectively use sudo

main
Sean McBride 4 years ago
parent 7fdef27570
commit fd837a9ce5

@ -2,5 +2,12 @@
if ! command -v hey; then
HEY_URL=https://hey-release.s3.us-east-2.amazonaws.com/hey_linux_amd64
wget $HEY_URL -O hey && chmod +x hey && sudo mv hey /usr/bin/hey
wget $HEY_URL -O hey
chmod +x hey
if [[ $(whoami) == "root" ]]; then
mv hey /usr/bin/hey
else
sudo mv hey /usr/bin/hey
fi
fi

@ -2,5 +2,12 @@
if ! command -v hey; then
HEY_URL=https://hey-release.s3.us-east-2.amazonaws.com/hey_linux_amd64
wget $HEY_URL -O hey && chmod +x hey && sudo mv hey /usr/bin/hey
wget $HEY_URL -O hey
chmod +x hey
if [[ $(whoami) == "root" ]]; then
mv hey /usr/bin/hey
else
sudo mv hey /usr/bin/hey
fi
fi

@ -2,5 +2,12 @@
if ! command -v hey; then
HEY_URL=https://hey-release.s3.us-east-2.amazonaws.com/hey_linux_amd64
wget $HEY_URL -O hey && chmod +x hey && sudo mv hey /usr/bin/hey
wget $HEY_URL -O hey
chmod +x hey
if [[ $(whoami) == "root" ]]; then
mv hey /usr/bin/hey
else
sudo mv hey /usr/bin/hey
fi
fi

Loading…
Cancel
Save