Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: chrome/test/data/safe_browsing/dmg/make_hfs.sh

Issue 2749033002: In make_hfs.sh, explicitly mount the new volume. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/sh 1 #!/bin/sh
2 2
3 # Copyright 2015 The Chromium Authors. All rights reserved. 3 # Copyright 2015 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # This script is used to generate an HFS file system with several types of 7 # This script is used to generate an HFS file system with several types of
8 # files of different sizes. 8 # files of different sizes.
9 9
10 set -eu 10 set -eu
(...skipping 15 matching lines...) Expand all
26 exit 1 26 exit 1
27 fi 27 fi
28 28
29 if [[ ! $OUT_FILE ]]; then 29 if [[ ! $OUT_FILE ]]; then
30 echo "Need to specify a destination filename." 30 echo "Need to specify a destination filename."
31 exit 1 31 exit 1
32 fi 32 fi
33 33
34 RAMDISK_VOLUME=$(hdiutil attach -nomount ram://$RAMDISK_SIZE) 34 RAMDISK_VOLUME=$(hdiutil attach -nomount ram://$RAMDISK_SIZE)
35 diskutil erasevolume "${FILESYSTEM_TYPE}" "${VOLUME_NAME}" ${RAMDISK_VOLUME} 35 diskutil erasevolume "${FILESYSTEM_TYPE}" "${VOLUME_NAME}" ${RAMDISK_VOLUME}
36 diskutil mount ${RAMDISK_VOLUME}
36 37
37 pushd "/Volumes/${VOLUME_NAME}" 38 pushd "/Volumes/${VOLUME_NAME}"
38 39
39 touch .metadata_never_index 40 touch .metadata_never_index
40 41
41 mkdir -p first/second/third/fourth/fifth 42 mkdir -p first/second/third/fourth/fifth
42 43
43 pushd first 44 pushd first
44 pushd second 45 pushd second
45 pushd third 46 pushd third
(...skipping 24 matching lines...) Expand all
70 71
71 echo "This is a test HFS+ filesystem generated by" \ 72 echo "This is a test HFS+ filesystem generated by" \
72 "chrome/test/data/safe_browsing/dmg/make_hfs.sh." > README.txt 73 "chrome/test/data/safe_browsing/dmg/make_hfs.sh." > README.txt
73 74
74 popd # Original PWD 75 popd # Original PWD
75 76
76 # Unmount the volume, copy the raw device to a file, and then destroy it. 77 # Unmount the volume, copy the raw device to a file, and then destroy it.
77 diskutil unmount force ${RAMDISK_VOLUME} 78 diskutil unmount force ${RAMDISK_VOLUME}
78 dd if=${RAMDISK_VOLUME} of="${OUT_FILE}" &> /dev/null 79 dd if=${RAMDISK_VOLUME} of="${OUT_FILE}" &> /dev/null
79 diskutil eject ${RAMDISK_VOLUME} 80 diskutil eject ${RAMDISK_VOLUME}
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698