1
0
Просмотр исходного кода

Fix install script running from different directory

Taddeus Kroes 2 недель назад
Родитель
Сommit
ed51c18701
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      install.sh

+ 3 - 2
install.sh

@@ -1,4 +1,6 @@
 #!/usr/bin/env bash
+set -euo pipefail
+
 DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
 
 if ! which git >/dev/null; then
@@ -7,12 +9,11 @@ if ! which git >/dev/null; then
 fi
 
 # git
-git submodule update --init
+git -C $DIR submodule update --init
 ln -sf $DIR/gitconfig ~/.gitconfig
 
 # bash
 ln -sf $DIR/bashrc ~/.bashrc
-source ~/.bashrc
 
 # tmux
 ln -sf $DIR/tmux.conf ~/.tmux.conf