Skip to content

Commit

Permalink
[update]change call path install scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
kenkenpa198 committed Mar 7, 2024
1 parent 68cbf34 commit cec527b
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions setup/ubuntu/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ function export_xdg {

# git clone dotfiles
function clone_dotfiles {
dotfiles_home=${HOME}/dotfiles
DOTFILES_HOME=${HOME}/dotfiles

if [ ! -d "${dotfiles_home}" ]; then
git clone https://github.com/kenkenpa198/dotfiles.git "${dotfiles_home}"
if [ ! -d "${DOTFILES_HOME}" ]; then
git clone https://github.com/kenkenpa198/dotfiles.git "${DOTFILES_HOME}"
else
git -C "${dotfiles_home}" pull origin main || true
git -C "${DOTFILES_HOME}" pull origin main || true
fi
}

Expand Down Expand Up @@ -65,11 +65,6 @@ function print_finished {
# メイン処理
###################################
function main {
# スクリプトファイルの配置場所をカレントディレクトリとする
# https://memo.yammer.jp/posts/shell-pwd
SCRIPT_DIR=`dirname $0`
cd "$SCRIPT_DIR"

# XDG Base Directory Specification
export_xdg

Expand All @@ -83,10 +78,10 @@ function main {
backup_origin_files

# アプリケーションのインストール
bash ./setup/ubuntu/install-git.sh
bash ./setup/ubuntu/install-apt-packages.sh
bash ./setup/ubuntu/install-sheldon.sh
bash ./setup/ubuntu/install-my-scripts.sh
bash "${HOME}/dotfiles/setup/ubuntu/install-git.sh"
bash "${HOME}/dotfiles/setup/ubuntu/install-apt-packages.sh"
bash "${HOME}/dotfiles/setup/ubuntu/install-sheldon.sh"
bash "${HOME}/dotfiles/setup/ubuntu/install-my-scripts.sh"

# シンボリックリンクを作成
bash ./setup/ubuntu/link.sh
Expand Down

0 comments on commit cec527b

Please sign in to comment.