summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-10-03 08:00:37 +0200
committerCaolán McNamara <caolanm@redhat.com>2014-10-08 15:20:43 +0000
commitebccd2dc8092ff873affceb1f17c0c11e0ad9e2b (patch)
tree202c883ec2600d564eba602765a1dae1bb69292a
parentd8dde16f6ef8053449d15e29a0d09851f62062f0 (diff)
fdo#82144 fix unpacking of additional tarballs
Change-Id: I74a61005fa9534b3f96cd392c6e38c54c5fd35e1 (cherry picked from commit 0ad5604c91cdd593739b4af5dd3168d9b23b016b) Reviewed-on: https://gerrit.libreoffice.org/11783 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--bin/unpack-sources10
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/unpack-sources b/bin/unpack-sources
index a6a14abe31df..f7b522545ebe 100644
--- a/bin/unpack-sources
+++ b/bin/unpack-sources
@@ -52,7 +52,7 @@ if test -z "$start_dir" ; then
echo "Error: Please, define where to unpack sources, try --help"
fi
-if ! test -f $start_dir/Repository.mk -a -f $start_dir/solenv/inc/target.mk ; then
+if ! test -f $start_dir/Repository.mk ; then
echo "Error: $start_dir is not a valid LibreOffice core source directory"
exit 1;
fi
@@ -74,8 +74,12 @@ for tarball in $tarballs ; do
fi
echo "Unpacking $tarname..."
- echo tar -xf "$tarball" -C "$lo_src_dir"
- if ! tar -xf "$tarball" -C "$lo_src_dir"; then
+ echo mkdir -p "$lo_src_dir/$tarname"
+ if ! mkdir -p "$lo_src_dir/$tarname" ; then
+ echo "Error: could not create directory $lo_src_dir/$tarname"
+ fi
+ echo tar -xf "$tarball" -C "$lo_src_dir/$tarname" --strip-components=1
+ if ! tar -xf "$tarball" -C "$lo_src_dir/$tarname" --strip-components=1; then
echo "Error: could not unpack $tarname"
exit 1
fi