/MacOS-Scripts

A collection of MacOS scripts.

Primary LanguageShellGNU General Public License v3.0GPL-3.0

MacOS Scripts

The scripts within this project are to support various useful operations on a system running MacOS.

Table of Contents

Warnings

⚠️ ⚠️ ⚠️
⚠️ Executing Imaging scripts may destroy data! ⚠️
⚠️ ⚠️ ⚠️

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Setup

In order to use the scripts within this package, you will need to clone, or download, the Utility-Scripts repository into the same top-level directory path.

/path/to/Utility-Scripts
/path/to/MacOS-Scripts

Scripts

Commands

run_as_admin.sh

A script to execute a command as the administrator.

Usage

[bash] ./run_as_admin.sh [auto_skip] <cmd>

Options

Option Flag Description
N/A N/A

Parameters

Parameter Description
Automated Skip Continue without prompting
Command Command to run

Examples

  • ./run_as_admin.sh "pwd"
  • ./run_as_admin.sh "auto_skip" "pwd"

run_as_user.sh

A script to execute a command as a specific user.

Usage

[bash] ./run_as_user.sh [auto_skip] <user> <cmd>

Options

Option Flag Description
N/A N/A

Parameters

Parameter Description
Automated Skip Continue without prompting
User User to run the command as
Command Command to run

Examples

  • ./run_as_user.sh "user" "pwd"
  • ./run_as_user.sh "auto_skip" "user" "pwd"

Data

list_drives.sh

A script to list all available drives.

Usage

[bash] ./list_drives.sh [auto_skip]

Options

Option Flag Description
N/A N/A

Parameters

Parameter Description
Automated Skip Continue without prompting

Examples

  • ./list_drives.sh
  • ./list_drives.sh "auto_skip"

Imaging

burn_iso_to_drive.sh

A script to burn an ISO image onto a chosen drive.

Usage

[bash] ./burn_iso_to_drive.sh [auto_skip] <iso_file> <drive_id>

Options

Option Flag Description
N/A N/A

Parameters

Parameter Description
Automated Skip Continue without prompting
ISO File ISO image to burn to the drive
Drive ID Drive ID to burn the ISO image onto

Examples

  • ./burn_iso_to_drive.sh "~/Documents/test_iso.iso" "da3"
  • ./burn_iso_to_drive.sh "auto_skip" "~/Documents/test_iso.iso" "da3"

Drives Tested

Status Component
Sandisk Ultra USB 2.0 Flash Drive (32GB)
Sandisk Ultra USB 3.0 Flash Drive (32GB)

Deployment

This section provides additional notes about how to deploy this on a live system.

Dependencies

Notes

This project does not contain any additional notes at this time.

Test Environments

Operating System Compatibility

Status System
MacOS 11.2.x
MacOS 11.1.x
MacOS 11.0.x

Hardware Compatibility

Status Component
MacBook Pro (15-inch, 2018)

Contributing

Please read CODE_OF_CONDUCT for details on our Code of Conduct and CONTRIBUTING for details on the process for submitting pull requests.

Support

Please read SUPPORT for details on how to request support from the team. For any security concerns, please read SECURITY for our related process.

Versioning

We use Semantic Versioning for versioning. For available releases, please see the available tags or look through our Release Notes. For extensive documentation of changes between releases, please see the Changelog.

Authors

  • Jack Thorp - Initial work - jhthorp

See also the list of contributors who participated in this project.

Copyright

Copyright © 2020 - 2021, Jack Thorp and associated contributors.

License

This project is licensed under the GNU General Public License - see the LICENSE for details.

Acknowledgments

  • N/A