From af6d2e8486a8e1ddb97c446a06fd7a037abf306d Mon Sep 17 00:00:00 2001 From: Ian Foster Date: Sat, 7 Dec 2013 16:55:49 -0800 Subject: [PATCH] ignore blank lines on submodule files --- awesome/submodules | 3 +-- link.sh | 15 +++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/awesome/submodules b/awesome/submodules index 6d3c053..2b285c5 100644 --- a/awesome/submodules +++ b/awesome/submodules @@ -1,4 +1,3 @@ https://github.com/bioe007/awesome-revelation.git awesome/revelation https://github.com/terceiro/awesome-freedesktop.git awesome/awesome-freedesktop -https://github.com/cedlemo/blingbling.git awesome/blingbling - +https://github.com/cedlemo/blingbling.git awesome/blingblin diff --git a/link.sh b/link.sh index 0385760..e018387 100755 --- a/link.sh +++ b/link.sh @@ -22,13 +22,16 @@ function downloadSubmodules { then while read l; do - read -a array <<< $l - if [ ! -e $dir/${array[1]} ]; + if [ -n "$l" ]; then - git clone ${array[0]} $dir/${array[1]} - else - echo "Updating git repo ${array[1]}" - git --git-dir=$dir/${array[1]}/.git pull + read -a array <<< $l + if [ ! -e $dir/${array[1]} ]; + then + git clone ${array[0]} $dir/${array[1]} + else + echo "Updating git repo ${array[1]}" + git --git-dir=$dir/${array[1]}/.git pull + fi fi done < $dir/submodules fi -- 1.9.1