#!/bin/bash

set -e

if [[ -d .git || -f .git ]]; then
    echo "(a cylc VERSION file is not needed in a cylc git repo)" >&2
else    
	VN=${PWD#*cylc-}
	echo "Setting VERSION from parent directory name: $VN" >&2
	echo $VN > VERSION
fi
