Fix tgz script (included all files in submodules)
authorCampbell Barton <ideasman42@gmail.com>
Sun, 5 Oct 2014 15:18:20 +0000 (17:18 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 5 Oct 2014 15:18:20 +0000 (17:18 +0200)
build_files/utils/build_tgz.sh

index 944bc52..9ffa72b 100755 (executable)
@@ -22,15 +22,18 @@ TARBALL="blender-$VERSION.tar.gz"
 
 cd "$blender_srcdir"
 
+# not so nice, but works
+FILTER_FILES_PY="import os, sys; [print(l[:-1]) for l in sys.stdin.readlines() if os.path.isfile(l[:-1])]"
+
 # Build master list
 echo -n "Building manifest of files:  \"$BASE_DIR/$MANIFEST\" ..."
-git ls-files > $BASE_DIR/$MANIFEST
+git ls-files | python -c "$FILTER_FILES_PY" > $BASE_DIR/$MANIFEST
 
 # Enumerate submodules
 for lcv in $(git submodule | awk '{print $2}'); do
        cd "$BASE_DIR"
        cd "$blender_srcdir/$lcv"
-       git ls-files | awk '$0="'"$lcv"/'"$0' >> $BASE_DIR/$MANIFEST
+       git ls-files | python -c "$FILTER_FILES_PY" | awk '$0="'"$lcv"/'"$0' >> $BASE_DIR/$MANIFEST
        cd "$BASE_DIR"
 done
 echo "OK"