[tbb-bugs] #20147 [Applications/Tor Browser]: [PATCH] (re-)dzip.sh: various improvements

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Sep 21 12:19:52 UTC 2016


#20147: [PATCH] (re-)dzip.sh: various improvements
-----------------------------------------------+---------------------------
 Reporter:  rustybird                          |          Owner:  tbb-team
     Type:  enhancement                        |         Status:
                                               |  needs_review
 Priority:  Medium                             |      Milestone:
Component:  Applications/Tor Browser           |        Version:
 Severity:  Normal                             |     Resolution:
 Keywords:  tbb-gitian, TorBrowserTeam201609R  |  Actual Points:
Parent ID:                                     |         Points:
 Reviewer:                                     |        Sponsor:
-----------------------------------------------+---------------------------

Comment (by rustybird):

 Thanks for the review!

 > It would be better to use a temporary directory name that is likely to
 be unique,
 > e.g., `TMPDIR=tmp-re-dzip-$$`

 Sounds good. Keeping it as `tmp-dzip` was probably too... timid. I've
 named the variable `TEMPDIR` in the v2 patch, on the off chance that
 https://en.wikipedia.org/wiki/TMPDIR might somehow affect `unzip` or
 `zip`.

 The commands have also been tweaked to fail early (instead of late) when
 `$1` has not been given.

 > Also, shouldn't this line: `(cd tmp_dzip; dzip.sh
 ./"$ZIPFILE_BASENAME")`
 > include a dot like so: `(cd tmp_dzip; dzip.sh ./"$ZIPFILE_BASENAME" .)`

 Those are equivalent: The first calls `find …` (because `"$@"` in the
 absence of arguments expands to nothing at all), while the second calls
 `find . …`. But using a consistent style is better, so v2 has the explicit
 dot.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/20147#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tbb-bugs mailing list