build: Fix Shellcheck for get_source_date_epoch.sh
authorPaul Spooren <mail@aparcar.org>
Sat, 15 Aug 2020 20:57:00 +0000 (10:57 -1000)
committerDaniel Golle <daniel@makrotopia.org>
Mon, 31 Aug 2020 10:18:06 +0000 (11:18 +0100)
commitae87e53e33a7e914ec340bebb45cb177724f5952
tree571730b26f8c3c750c8707934672d2aa02a0f3cb
parent7d26f294cd0b2bd4ea3475e55e6c68cf0ede46ac
build: Fix Shellcheck for get_source_date_epoch.sh

If a `cd` to `TOPDIR` fails the script should quit.

Also unify `try_mtime` function by storing it in a variable.

Signed-off-by: Paul Spooren <mail@aparcar.org>
scripts/get_source_date_epoch.sh