summaryrefslogtreecommitdiff
path: root/bundle_pyinstaller.sh
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2015-08-05 08:48:25 +0200
committerIvan Alejandro <ivanalejandro0@gmail.com>2015-08-06 12:48:49 -0300
commitecf887845fbb403d723a4f52dd3b7d0eab908b9f (patch)
treeefb265c1bda2583966402eb8b803401c63525869 /bundle_pyinstaller.sh
parent3a13ff32fa7c172e8206b392d6e61f1e4a1a0e6c (diff)
[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
Diffstat (limited to 'bundle_pyinstaller.sh')
-rwxr-xr-xbundle_pyinstaller.sh10
1 files 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(){