Skip to content
This repository was archived by the owner on Jun 5, 2020. It is now read-only.

Commit 7c8a519

Browse files
committed
Add dist dir to default path
1 parent 03cbc85 commit 7c8a519

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

install

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import subprocess
88
import urllib
99

1010
root_path = os.getcwd()
11+
root_dir = os.path.dirname(os.path.realpath(__file__))
1112
base_url = 'https://github.com/vmolsa/libcrtc/releases/download'
1213

1314
target_platform = sys.platform
@@ -26,14 +27,21 @@ elif (target_cpu == 'i386'):
2627
argc = len(sys.argv)
2728
argv = str(sys.argv)
2829

29-
release_name = ''.join(subprocess.check_output(['git', 'describe', '--abbrev=0', '--tags']).split())
30+
release_name = 'master'
31+
32+
os.chdir(root_dir)
33+
34+
try:
35+
release_name = ''.join(subprocess.check_output(['git', 'describe', '--abbrev=0', '--tags']).split())
36+
except ValueError:
37+
release_name = 'master'
3038

3139
if (argc == 3):
3240
release_name = str(sys.argv[2])
3341
print 'Tag: ' + release_name
3442

3543
pkg_name = 'libcrtc-' + release_name + '-' + target_os + '-' + target_cpu + '.tar.gz'
36-
target_path = root_path
44+
target_path = os.path.join(root_dir, 'dist')
3745

3846
if (argc >= 2):
3947
target_path = str(sys.argv[1])

0 commit comments

Comments
 (0)