Skip to contentSkip to conversation

scripts/package/buildtar: don't complain if lib/ is missing

PATCH New Jim Davis 1 participant 1 message Nov 20, 2015 Kbuild

lore
Share & tools
lore

Jim Davis

author
#0 lore raw

PATCH 1/1 scripts/package/buildtar: don't complain if lib/ is missing

Building a tinyconfig kernel or similar stripped-down configurations may not have a lib directory to tar up. Test for a lib directory to avoid an unnecessary error message.

---
 scripts/package/buildtar | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
scripts/package/buildtar +5 -1
index e046bff33589..b52475d2be3b 100755
@@ -129,7 +129,11 @@ esac
 	if tar --owner=root --group=root --help >/dev/null 2>&1; then
 		opts="--owner=root --group=root"
 	fi
-	tar cf - -C "$tmpdir" boot/ lib/ $opts | ${compress} > "${tarball}${file_ext}"
+	lib=
+	if test -d "$tmpdir/lib"; then
+		lib="lib/"
+	fi
+	tar cf - -C "$tmpdir" boot/ $lib $opts | ${compress} > "${tarball}${file_ext}"
 )
 
 echo "Tarball successfully created in ${tarball}${file_ext}"
Signature · 1 line
2.6.2.195.g0c4dd78