File tree Expand file tree Collapse file tree 5 files changed +21
-13
lines changed
Expand file tree Collapse file tree 5 files changed +21
-13
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,6 @@ if [ -x "$GREADLINK" ]; then
1111fi
1212unset GREADLINK
1313
14- MKTEMP=$( which mktemp 2> /dev/null || true)
15- GMKTEMP=$( which gmktemp 2> /dev/null || true)
16- if [ -x " $GMKTEMP " ]; then
17- MKTEMP=" $GMKTEMP "
18- fi
19- unset GMKTEMP
20-
2114check_for_gnu_version () {
2215 gnu_available=$( " $1 " --version 2>&1 | grep GNU)
2316 if [ ! " $gnu_available " ]; then
@@ -29,5 +22,4 @@ check_for_gnu_version() {
2922 fi
3023}
3124
32- check_for_gnu_version " $MKTEMP " " mktemp"
3325check_for_gnu_version " $READLINK " " readlink"
Original file line number Diff line number Diff line change 55set -o errexit -o xtrace
66
77cd $( dirname $0 )
8- source locate-gnu-utils.sh
8+
99source makecrx.sh
10- PROFILE_DIRECTORY=" $( " $MKTEMP " -d) "
10+ source utils/mktemp.sh
11+
12+ PROFILE_DIRECTORY=" $( mktemp -d) "
1113trap ' rm -r "$PROFILE_DIRECTORY"' EXIT
1214chromium-browser \
1315 --user-data-dir=" $PROFILE_DIRECTORY " \
Original file line number Diff line number Diff line change 55#
66
77cd $( dirname $0 )
8- source locate-gnu-utils.sh
9- TMP=` " $MKTEMP " `
8+
9+ source utils/mktemp.sh
10+
11+ TMP=" $( mktemp) "
1012trap ' rm "$TMP"' EXIT
1113if ! [ -d https-everywhere-checker ] ; then
1214 echo " Submodule https-everywhere-checker is missing. Run"
Original file line number Diff line number Diff line change @@ -6,12 +6,13 @@ source locate-gnu-utils.sh
66# We have to change to the right directory because this is sometimes invoked
77# through a symlink in .git/hooks/pre-push.
88cd $( dirname $( " $READLINK " -f $0 ) )
9+ source utils/mktemp.sh
910
1011# dummy Jetpack addon that contains tests
1112TEST_ADDON_PATH=./https-everywhere-tests/
1213
1314# We'll create a Firefox profile here and install HTTPS Everywhere into it.
14- PROFILE_DIRECTORY=" $( " $MKTEMP " -d) "
15+ PROFILE_DIRECTORY=" $( mktemp -d) "
1516trap ' rm -r "$PROFILE_DIRECTORY"' EXIT
1617HTTPSE_INSTALL_DIRECTORY=$PROFILE_DIRECTORY /extensions/https-everywhere@eff.org
1718
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ #
3+ # BSD and GNU mktemp have slightly different invocation patterns.
4+ # BSD's needs a -t option specifying a "template." 'everywhere' will
5+ # end up in the temp-folder name, so in the event it doesn't get cleaned
6+ # up, there's some indication of where it originated.
7+
8+ MKTEMP=` which mktemp`
9+ function mktemp() {
10+ $MKTEMP $@ 2> /dev/null || $MKTEMP -t everywhere $@
11+ }
You can’t perform that action at this time.
0 commit comments