Yes, this is a bad idea. Yes, everybody does it anyway.
curl -LSs https://gist.github.com/kdm9/2c715a2e4fc1c4f93bb22c0beba6d73e/raw/get-annex.sh | bash
will install git-annex standalone under ~/.local/opt
, with symlinks to ~/.local/bin
#!/bin/bash | |
set -xe | |
mkdir -p ~/.local/opt | |
cd ~/.local/opt | |
wget -O git-annex-standalone-amd64.tar.gz https://downloads.kitenet.net/git-annex/linux/current/git-annex-standalone-amd64.tar.gz | |
rm -rf git-annex.linux | |
tar xvf git-annex-standalone-amd64.tar.gz | |
mkdir -p ~/.local/bin | |
ln -sf $PWD/git-annex.linux/{git,git-annex,git-annex-shell,git-receive-pack,git-upload-pack,git-shell} ~/.local/bin | |
set +x | |
echo "$PATH" | grep "$HOME/.local/bin" &>/dev/null || echo "You must add ~/.local/bin/ to your PATH, e.g. with echo '"'export PATH="$HOME/.local/bin:$PATH"'"'>>~/.bashrc" |