File tree 2 files changed +13
-7
lines changed
2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change 18
18
19
19
DMGFILE=$1
20
20
OUTFILE=$2
21
+
22
+ echo $OUTFILE
23
+
21
24
mkdir -p tmp
22
- VOLUME=$( hdiutil attach " ${DMGFILE} " | tail -1 | awk ' {print $3}' )
23
- cp -r " ${VOLUME} /" * .app tmp
25
+ VOLUME=" $( hdiutil attach " ${DMGFILE} " | tail -1 | awk -F' \t' ' {print $NF}' ) "
26
+ CWD=" ` pwd` "
27
+ echo ${VOLUME}
28
+ cd " ${VOLUME} "
29
+ zip -r /tmp/firefox.zip * .app
30
+ cd " ${CWD} "
24
31
hdiutil detach " ${VOLUME} " > /dev/null
25
- cd tmp
26
- zip -r " ../${OUTFILE} " *
27
- cd ..
28
- rm -rf tmp
29
- rm " ${DMGFILE} "
32
+ # rm "${DMGFILE}"
33
+ mv /tmp/firefox.zip " $OUTFILE "
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ def _dmg_archive_impl(repository_ctx):
24
24
repository_ctx .extract (
25
25
archive = zip_name ,
26
26
stripPrefix = repository_ctx .attr .strip_prefix ,
27
+ output = repository_ctx .attr .output ,
27
28
)
28
29
29
30
repository_ctx .file (
@@ -39,6 +40,7 @@ dmg_archive = repository_rule(
39
40
),
40
41
"sha256" : attr .string (),
41
42
"strip_prefix" : attr .string (),
43
+ "output" : attr .string (),
42
44
"build_file_content" : attr .string (),
43
45
"build_file" : attr .label (),
44
46
},
You can’t perform that action at this time.
0 commit comments