mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 06:12:34 +00:00
18 lines
271 B
Bash
Executable File
18 lines
271 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Creates an encrypted disk image from a folder
|
|
|
|
set -e
|
|
|
|
from="$1"
|
|
to="$2"
|
|
|
|
if [ -z "$1" ] || [ -z "$2" ]; then
|
|
echo "Usage: dmg <fromdir> <todir>"
|
|
echo ""
|
|
exit 1
|
|
fi
|
|
|
|
name="$(isosec).dmg"
|
|
hdiutil create -encryption AES-256 -srcfolder "$from" "$to/$name"
|