Skip to content

Instantly share code, notes, and snippets.

View okash1n's full-sized avatar

Shintaro Okamura okash1n

View GitHub Profile
#!/usr/bin/env bash
diskutil unMountDisk /dev/disk2
diskutil eraseDisk HFS+ USBDISK /dev/disk2
/Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/USBDISK --nointeraction --downloadassets
#!/bin/bash
# init
## check OS
if [ "$(uname)" == 'Darwin' ]; then
OS='Mac'
elif [ "$(expr substr $(uname -s) 1 5)" == 'Linux' ]; then
OS='Linux'
elif [ "$(expr substr $(uname -s) 1 10)" == 'MINGW32_NT' ]; then