From f2b4314b7d15c2894c8b9daffd49b9c94060fa7f Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Sun, 17 Aug 2014 13:38:43 +0900 Subject: [PATCH] setup.sh: selfupdate do not use DOTFILES_DIR --- setup.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/setup.sh b/setup.sh index 8e7942a..4a0e09d 100755 --- a/setup.sh +++ b/setup.sh @@ -107,9 +107,15 @@ detect_systems(){ setup_selfupdate(){ _msg "Download latest setup.sh from 10sr repository." - mkdir -p "$DOTFILES_nDIR" - _download $_dotfiles_url_base/setup.sh "$DOTFILES_DIR/"setup.sh - chmod +x "$DOTFILES_DIR"/setup.sh + if test -z "$1" + then + _warn "Filename for setup script is not given" + echo "usage: setup.sh selfupdate " + _die "Abort" + fi + mkdir -vp "`dirname $1`" + _download $_dotfiles_url_base/setup.sh "$DOTFILES_DIR/$1" + chmod +x "$DOTFILES_DIR/$1" }