do not continue if there is no git log for the EN base file
This commit is contained in:
parent
0b6f8d5b08
commit
bb5466ecd1
|
@ -69,6 +69,13 @@ if [ ! -e "$EN" ]; then
|
|||
exit 2
|
||||
fi
|
||||
endate=$(git log --pretty="%cd" --date=raw -1 "$EN"|cut -d' ' -f1)
|
||||
|
||||
# check if we have a git log of the EN base file. If not, abort
|
||||
if [ -z "${endate}" ]; then
|
||||
out "EN file does not have any Git log. Ususally this means the file is new"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Convert to YYYY-MM-DD
|
||||
ymd=$(date +"%Y-%m-%d" --date="@$endate")
|
||||
out "Basefile: $EN ( $ymd )"
|
||||
|
|
Loading…
Reference in New Issue