From 556fd0d783c3a96e35f1a3dc95b990c973371261 Mon Sep 17 00:00:00 2001 From: Eriks Karls Date: Wed, 9 Nov 2022 15:28:30 +0200 Subject: [PATCH] Download script --- README.md | 25 +++++++++++++++++++++++++ download.sh | 15 +++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 download.sh diff --git a/README.md b/README.md index 787ac78..ccfa809 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,27 @@ # bashrc +## Download +### Automated +#### cURL +`curl https://git.72.lv/eriks/bashrc/raw/branch/master/download.sh | bash` + +#### wget +`wget -qO - https://git.72.lv/eriks/bashrc/raw/branch/master/download.sh | bash` + +### Manual +#### cURL +``` +curl -Os "https://git.72.lv/eriks/bashrc/raw/branch/master/.bash_profile" +curl -Os "https://git.72.lv/eriks/bashrc/raw/branch/master/.bash_logout" +curl -Os "https://git.72.lv/eriks/bashrc/raw/branch/master/.bash_aliases" +curl -Os "https://git.72.lv/eriks/bashrc/raw/branch/master/.bashrc" +``` + +#### wget +``` +wget "https://git.72.lv/eriks/bashrc/raw/branch/master/.bash_profile" -O .bash_profile +wget "https://git.72.lv/eriks/bashrc/raw/branch/master/.bash_logout" -O .bash_logout +wget "https://git.72.lv/eriks/bashrc/raw/branch/master/.bash_aliases" -O .bash_aliases +wget "https://git.72.lv/eriks/bashrc/raw/branch/master/.bashrc" -O .bashrc +``` + diff --git a/download.sh b/download.sh new file mode 100644 index 0000000..30cf527 --- /dev/null +++ b/download.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +CURL=$(command -v curl) +WGET=$(command -v wget) +if [[ -n $CURL ]]; then + $CURL -Os "https://git.72.lv/eriks/bashrc/raw/branch/master/.bash_profile" + $CURL -Os "https://git.72.lv/eriks/bashrc/raw/branch/master/.bash_logout" + $CURL -Os "https://git.72.lv/eriks/bashrc/raw/branch/master/.bash_aliases" + $CURL -Os "https://git.72.lv/eriks/bashrc/raw/branch/master/.bashrc" +elif [[ -n $WGET ]]; then + $WGET "https://git.72.lv/eriks/bashrc/raw/branch/master/.bash_profile" -O .bash_profile + $WGET "https://git.72.lv/eriks/bashrc/raw/branch/master/.bash_logout" -O .bash_logout + $WGET "https://git.72.lv/eriks/bashrc/raw/branch/master/.bash_aliases" -O .bash_aliases + $WGET "https://git.72.lv/eriks/bashrc/raw/branch/master/.bashrc" -O .bashrc +fi