Skip to content

Commit

Permalink
Merge pull request #209 from jesseduffield/dawidd6-patch-1
Browse files Browse the repository at this point in the history
install_update_linux: allow specifying directory
  • Loading branch information
dawidd6 authored Mar 19, 2020
2 parents 22ab840 + 86302e8 commit 10617da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ Automated install/update, don't forget to always verify what you're piping into
curl https://raw.githubusercontent.com/jesseduffield/lazydocker/master/scripts/install_update_linux.sh | bash
```

The script installs downloaded binary to `/usr/local/bin` directory by default, but it can be changed by setting `DIR` environment variable.

### Go

Required Go version >= **1.8**
Expand Down
5 changes: 4 additions & 1 deletion scripts/install_update_linux.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

0 comments on commit 10617da

Please sign in to comment.