install_update_linux: allow specifying directory

Closes #208
This commit is contained in:
Dawid Dziurla 2020-03-15 19:02:45 +01:00 committed by GitHub
parent 22ab840439
commit 60640d4fe4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,8 @@
#!/bin/bash
# allow specifying different destination directory
DIR="${DIR:-"/usr/local/bin"}"
# map different architecture variations to the available binaries
ARCH=$(uname -m)
case $ARCH in
@ -17,5 +20,5 @@ GITHUB_URL="https://github.com/jesseduffield/lazydocker/releases/download/${GITH
# install/update the local binary
curl -L -o lazydocker.tar.gz $GITHUB_URL
tar xzvf lazydocker.tar.gz lazydocker
sudo mv -f lazydocker /usr/local/bin/
sudo mv -f lazydocker "$DIR"
rm lazydocker.tar.gz