Kaynağa Gözat

use SETUP_OUTPUT for setup_selfupdate

pull/1/head
10sr 11 yıl önce
ebeveyn
işleme
53a2f04411
1 değiştirilmiş dosya ile 22 ekleme ve 12 silme
  1. +22
    -12
      setup.sh

+ 22
- 12
setup.sh Dosyayı Görüntüle

@@ -7,6 +7,21 @@ __setups="gitconf tmux scripts darwin dirs selfupdate"
__homelocal="$HOME/.local"
__homevar="$HOME/.var"

###########################
# utils

_download(){
# download <url> <file>
if type wget >/dev/null 2>&1
then
wget $__my_wget_options "$1" -O "$2"
elif type curl >/dev/null 2>&1
then
curl --url "$1" --output "$2"
fi
}


#############################
# gen_common

@@ -57,7 +72,13 @@ __EOC__
__setup_url="https://raw.github.com/10sr/dotfiles/master/setup.sh"

setup_selfupdate(){
curl $__setup_url
if test -z "$SETUP_OUTPUT"
then
echo SETUP_OUTPUT is not set.
echo Ignore selfupdate.
return
fi
_download $__setup_url "$SETUP_OUTPUT"
}

################################
@@ -154,17 +175,6 @@ __EOC__
##############################
# install_scripts

_download(){
# download <url> <file>
if type wget >/dev/null 2>&1
then
wget $__my_wget_options "$1" -O "$2"
elif type curl >/dev/null 2>&1
then
curl --url "$1" --output "$2"
fi
}

_fetch_script(){
# _fetch_script <url> <binname>
url="$1"


Yükleniyor…
İptal
Kaydet