summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2014-12-22 21:56:09 +0100
committerAdam Stankiewicz <sheerun@sher.pl>2014-12-22 21:56:09 +0100
commit8e26e6e963434108d418557cd48cf6604de30c0d (patch)
tree905b300b05ad06d49d35848b4e2594a4630307c4
parent676e9dd82ef7e2dfb61a3eea0be36bc997def02a (diff)
downloadvim-polyglot-8e26e6e963434108d418557cd48cf6604de30c0d.tar.gz
vim-polyglot-8e26e6e963434108d418557cd48cf6604de30c0d.zip
Allow selecting subtree of git repository
Diffstat (limited to '')
-rwxr-xr-xbuild8
1 files changed, 5 insertions, 3 deletions
diff --git a/build b/build
index 26e83fae..fe501c6c 100755
--- a/build
+++ b/build
@@ -23,17 +23,18 @@ extract() {
path="$(printf "$pack" | cut -d ':' -f 2)"
dir="tmp/$(printf "$path" | cut -d '/' -f 2)"
directories="DIRS$(printf "$pack" | cut -d ':' -f 3)"
+ subtree="$(printf "$pack" | cut -d ':' -f 4)"
printf -- "- [$name](https://github.com/$path) ("
subdirs=""
for subdir in ${!directories}; do
- if [ -d "$dir/$subdir" ]; then
+ if [ -d "${dir}${subtree:-/}${subdir}" ]; then
base="$(basename "$subdir")"
if [[ "$subdirs" != *"$base"* ]]; then
subdirs="$subdirs, $base"
fi
- copy_dir "$dir" "$subdir"
+ copy_dir "${dir}${subtree}" "$subdir"
fi
done
@@ -45,8 +46,9 @@ extract() {
name="$(printf "$pack" | cut -d ':' -f 1)"
path="$(printf "$pack" | cut -d ':' -f 2)"
dir="tmp/$(printf "$path" | cut -d '/' -f 2)"
+ subtree="$(printf "$pack" | cut -d ':' -f 4)"
- if [ -d "$dir/plugin" ]; then
+ if [ -d "$dir${subtree:-/}plugin" ]; then
printf "Possible error (plugin directory exists): $path\n"
fi
done