14 lines
303 B
Plaintext
Executable File
14 lines
303 B
Plaintext
Executable File
#!/usr/bin/env nix-shell
|
|
#!nix-shell -i bash -p bash
|
|
|
|
set -e
|
|
|
|
dirpath="$1"
|
|
|
|
if ! test -d "$dirpath"
|
|
then
|
|
# if the directory *doesn't* exist, try creating it
|
|
# if we fail to create it, ensure we raced with something else and that it's actually a directory
|
|
mkdir "$dirpath" || test -d "$dirpath"
|
|
fi
|