Cleaning up some scripts and moving to autoload functions

This commit is contained in:
2023-10-08 10:26:30 -04:00
parent 05b36efeea
commit 0f58b00f97
26 changed files with 123 additions and 102 deletions

16
zsh/config/functions/dmg Executable file
View File

@@ -0,0 +1,16 @@
#!/bin/zsh
# Creates an encrypted disk image from a folder
function dmg() {
from="$1"
to="$2"
if [ -z "$1" ] || [ -z "$2" ]; then
echo "Usage: dmg <fromdir> <todir>"
echo ""
return 1
fi
name="$(isosec).dmg"
hdiutil create -encryption AES-256 -srcfolder "$from" "$to/$name"
}