Skip to content

Instantly share code, notes, and snippets.

View docrinehart's full-sized avatar

Doc Rinehart docrinehart

View GitHub Profile
@jayotterbein
jayotterbein / clonevm.sh
Last active May 30, 2022 21:35
Shell script to clone a VMWare fusion VM and rename all the appropriate files
#!/bin/bash
shopt -s nullglob # When expanding wildcards into files, return null when no matches are found
set -e # Abort script on any error
src="Windows 10 x64" # Default source VM
pushd "$HOME/Documents/Virtual Machines.localized" # Avoid full path usage everywhere
if [ $# -eq 0 ]; then
echo "Usage: $(basename $0) newvm"
echo "$src is used for the source vm"
exit