diff --git a/init_root.sh b/init_root.sh index cc5e039..2451426 100755 --- a/init_root.sh +++ b/init_root.sh @@ -10,7 +10,11 @@ git_clone() { local dir=$2 if [ ! -d "$dir" ]; then - git clone --single-branch --recursive "$github/$repo" $dir + if [ "$3" = "--norecursive" ]; then + git clone --single-branch "$github/$repo" $dir + else + git clone --single-branch --recursive "$github/$repo" $dir + fi fi } @@ -120,7 +124,7 @@ configure_tmux() { if [[ -z "$response" ]] || [[ $response =~ ^[Yy]$ ]]; then apt install tmux -y - git_clone tmux-plugins/tpm ~/.tmux/plugins/tpm + git_clone tmux-plugins/tpm ~/.tmux/plugins/tpm --norecursive git_clone tmux-plugins/tmux-sensible ~/.tmux/plugins/tmux-sensible git_clone tmux-plugins/tmux-yank ~/.tmux/plugins/tmux-yank git_clone tmux-plugins/tmux-prefix-highlight ~/.tmux/plugins/tmux-prefix-highlight diff --git a/init_sudo.sh b/init_sudo.sh index 4af8b65..ae2146f 100755 --- a/init_sudo.sh +++ b/init_sudo.sh @@ -10,7 +10,11 @@ git_clone() { local dir=$2 if [ ! -d "$dir" ]; then - git clone --single-branch --recursive "$github/$repo" $dir + if [ "$3" = "--norecursive" ]; then + git clone --single-branch "$github/$repo" $dir + else + git clone --single-branch --recursive "$github/$repo" $dir + fi fi } @@ -120,7 +124,7 @@ configure_tmux() { if [[ -z "$response" ]] || [[ $response =~ ^[Yy]$ ]]; then sudo apt install tmux -y - git_clone tmux-plugins/tpm ~/.tmux/plugins/tpm + git_clone tmux-plugins/tpm ~/.tmux/plugins/tpm --norecursive git_clone tmux-plugins/tmux-sensible ~/.tmux/plugins/tmux-sensible git_clone tmux-plugins/tmux-yank ~/.tmux/plugins/tmux-yank git_clone tmux-plugins/tmux-prefix-highlight ~/.tmux/plugins/tmux-prefix-highlight