mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-01 06:47:22 +00:00
15 lines
219 B
Bash
Executable File
15 lines
219 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Verify folder exists, and if it does not, create it.
|
|
|
|
dir="$1"
|
|
|
|
[ $# -eq 0 ] && {
|
|
echo "Usage: $0 full/path/to/dir/to/create"
|
|
exit 1
|
|
}
|
|
|
|
if [ ! -d "$dir" ]; then
|
|
mkdir -p "$dir" && exit 0
|
|
fi
|
|
|