File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ ORIG="work/ubuntu-$VERSION-$DISTRO-$ARCH.iso"
8
8
COPY=" work/ubuntu-$VERSION -$DISTRO -$ARCH "
9
9
ISO=" work/$NICKNAME -ubuntu-$VERSION -$DISTRO -$ARCH .iso"
10
10
MOUNT=" work/mount"
11
- MACOS =$( which hdiutil )
11
+ PLATFORM =$( uname )
12
12
13
13
# Download the original ISO if it isn't present already.
14
14
[ -f " $ORIG " ] || curl -L -o " $ORIG " \
@@ -23,7 +23,7 @@ mkdir "$MOUNT"
23
23
24
24
echo Mounting ISO
25
25
# Make a writable copy of the original ISO.
26
- if [ " $MACOS " ]; then
26
+ if [ " $PLATFORM " = " Darwin " ]; then
27
27
# os x
28
28
DEVNODE=$( sudo hdiutil attach -nomount " $ORIG " | head -1 | awk " {print \$ 1}" )
29
29
sudo mount -t cd9660 " $DEVNODE " " $MOUNT "
@@ -37,7 +37,7 @@ rsync -a "$MOUNT/" "$COPY"
37
37
38
38
echo Unmounting ISO
39
39
sudo umount " $MOUNT "
40
- if [ " $MACOS " ]; then
40
+ if [ " $PLATFORM " = " Darwin " ]; then
41
41
sudo hdiutil eject " $DEVNODE "
42
42
fi
43
43
rm -rf " $MOUNT "
You can’t perform that action at this time.
0 commit comments