Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
1a4351a6
Kaydet (Commit)
1a4351a6
authored
Agu 05, 2017
tarafından
Markus Mohrhard
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
updater: handle paths with spaces correctly
Change-Id: I8089f1e2b46a242562608431e56c5da4c63fdb01
üst
f3c1987f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
uncompress_mar.py
bin/update/uncompress_mar.py
+8
-3
No files found.
bin/update/uncompress_mar.py
Dosyayı görüntüle @
1a4351a6
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
# Extract a mar file and uncompress the content
# Extract a mar file and uncompress the content
import
os
import
os
import
re
import
sys
import
sys
import
subprocess
import
subprocess
from
path
import
convert_to_native
from
path
import
convert_to_native
...
@@ -26,13 +27,17 @@ def extract_mar(mar_file, target_dir):
...
@@ -26,13 +27,17 @@ def extract_mar(mar_file, target_dir):
subprocess
.
check_call
([
mar
,
"-C"
,
convert_to_native
(
target_dir
),
"-x"
,
convert_to_native
(
mar_file
)])
subprocess
.
check_call
([
mar
,
"-C"
,
convert_to_native
(
target_dir
),
"-x"
,
convert_to_native
(
mar_file
)])
file_info
=
subprocess
.
check_output
([
mar
,
"-t"
,
convert_to_native
(
mar_file
)])
file_info
=
subprocess
.
check_output
([
mar
,
"-t"
,
convert_to_native
(
mar_file
)])
lines
=
file_info
.
splitlines
()
lines
=
file_info
.
splitlines
()
prog
=
re
.
compile
(
"
\
d+
\
s+
\
d+
\
s+(.+)"
)
for
line
in
lines
:
for
line
in
lines
:
info
=
line
.
split
()
match
=
prog
.
match
(
line
.
decode
(
"utf-8"
,
"strict"
))
if
match
is
None
:
continue
info
=
match
.
groups
()[
0
]
# ignore header line
# ignore header line
if
info
[
2
]
==
b
'NAME'
:
if
info
==
b
'NAME'
:
continue
continue
uncompress_content
(
os
.
path
.
join
(
target_dir
,
info
[
2
]
.
decode
(
"utf-8"
)
))
uncompress_content
(
os
.
path
.
join
(
target_dir
,
info
))
def
main
():
def
main
():
if
len
(
sys
.
argv
)
!=
3
:
if
len
(
sys
.
argv
)
!=
3
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment