Download script

This commit is contained in:
Eriks Karls 2022-11-09 15:28:30 +02:00
parent f191341fb3
commit 556fd0d783
2 changed files with 40 additions and 0 deletions

View File

@ -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
```

15
download.sh Normal file
View File

@ -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