mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-21 23:01:03 +00:00
Merge pull request #209 from jesseduffield/dawidd6-patch-1
install_update_linux: allow specifying directory
This commit is contained in:
commit
10617da560
2 changed files with 6 additions and 1 deletions
|
|
@ -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**
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue