Commit 6d5d44ae authored by Marc's avatar Marc
Browse files

add fail function to download_databases_from_s3bucket script for error handling

parent c0ed69dc
......@@ -54,12 +54,19 @@ function sync_data () {
rm "${ele}.tar.gz"
done
ln -s 'pfam-31/' 'pfam'
ln -s -f 'pfam-31/' 'pfam'
echo "[$(date)] psot (PID $$) downloaded databases to $DATADIR" >> $LOGFILE
}
function fail () {
echo >&2 "$1"
exit 1
}
[ "$#" -eq 2 ] || fail "2 arguments required, $# provided"
if [[ -e $LOGFILE ]]; then
test_datadir
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment