From 3b181149cfe46b756809ea55343253de2b41b153 Mon Sep 17 00:00:00 2001 From: cdpb Date: Thu, 10 Nov 2022 13:47:55 +0100 Subject: [PATCH] Add option for custom install paths --- docs/markdown/installation.md | 6 ++++++ install.sh | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/markdown/installation.md b/docs/markdown/installation.md index 6fa8230..eda757d 100644 --- a/docs/markdown/installation.md +++ b/docs/markdown/installation.md @@ -8,6 +8,12 @@ Autorestic requires `bash`, `wget` and `bzip2` to be installed. For most systems wget -qO - https://raw.githubusercontent.com/cupcakearmy/autorestic/master/install.sh | bash ``` +Or for custom install paths. + +```bash +wget -qO - https://raw.githubusercontent.com/cupcakearmy/autorestic/master/install.sh | OUT_FILE=~/.local/bin/autorestic bash +``` + ## Alternatives ### Docker diff --git a/install.sh b/install.sh index 57600bc..375148d 100755 --- a/install.sh +++ b/install.sh @@ -2,7 +2,11 @@ shopt -s nocaseglob -OUT_FILE=/usr/local/bin/autorestic +# set OUT_FILE to custom install path +# wget -qO - https://raw.githubusercontent.com/cupcakearmy/autorestic/master/install.sh | OUT_FILE=~/.local/bin/autorestic bash +if [[ -z $OUT_FILE ]]; then + OUT_FILE=/usr/local/bin/autorestic +fi # Type NATIVE_OS=$(uname | tr '[:upper:]' '[:lower:]')