From ecf887845fbb403d723a4f52dd3b7d0eab908b9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Wed, 5 Aug 2015 08:48:25 +0200 Subject: [feat] Detect sumo top folder with tar The script was assuming that the sumo tarball was named after the version of bitmask it contains, but "latest" symlink generated by buildbot doesn't follow that rule. Let tar list the folder the tarball generates (assuming there is only one folder, and that it's listed in first place), and follow accordingly. - Related: #7345 --- bundle_pyinstaller.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bundle_pyinstaller.sh b/bundle_pyinstaller.sh index d504635..7bc9764 100755 --- a/bundle_pyinstaller.sh +++ b/bundle_pyinstaller.sh @@ -154,11 +154,13 @@ install_sumo(){ _cdsitepackages - # the file name is like 'leap.bitmask-0.9.0rc1-12-g59bc704-SUMO.tar.gz' + # the file name may be like 'leap.bitmask-0.9.0rc1-12-g59bc704-SUMO.tar.gz', + # but it also can be 'leap.bitmask-latest-SUMO.tar.gz' # and the root path inside the archive for that file would be - # 'leap.bitmask-0.9.0rc1-12-g59bc704-SUMO' - base_path=`basename $SUMO_PATH .tar.gz` - tar xzf $SUMO_PATH $base_path/src/leap/ --strip-components=2 + # 'leap.bitmask-0.9.0rc1-12-g59bc704-SUMO' in both cases. + base_path=`tar tzf $SUMO_PATH | head -n 1` + target_subpath=src/leap + tar xzf $SUMO_PATH $base_path$target_subpath --strip-components=2 } add_files(){ -- cgit v1.2.3