fedhub/async-git/tests/helper.sh

16 lines
280 B
Bash
Raw Normal View History

2020-04-22 03:13:53 +00:00
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"
}