fedhub/async-git/tests/helper.sh

16 lines
No EOL
280 B
Bash
Executable file

function get_temp_name {
temp_dir=$(mktemp -u -d -t $1-XXXXXXXX)
}
function error {
echo $* > /dev/stderr
false
}
function file_exists {
[[ -f $1 ]] || error "file $1 doesn't exist"
}
function dir_exists {
[[ -d $1 ]] || error "directory $1 doesn't exist"
}