Debian Codegraph @

test/regression/scripts/getdata

raw
1 #!/bin/bash
2 #
3 # Copyright (C) 2013 Anders Logg and Martin Sandve Alnaes
4 #
5 # This file is part of FIAT.
6 #
7 # FIAT is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU Lesser General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
11 #
12 # FIAT is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU Lesser General Public License for more details.
16 #
17 # You should have received a copy of the GNU Lesser General Public License
18 # along with FIAT. If not, see <http://www.gnu.org/licenses/>.
19 #
20 # First added: 2013-04-22
21 # Last changed: 2013-08-21
22 #
23 # This script checks out reference data by the given commit id,
24 # or if none given using the commit id found in data id file.
25
26 # Parameters
27 source scripts/parameters
28
29 # Take data id as optional argument or get from file
30 DATA_ID=$1 && [ -z "$DATA_ID" ] && DATA_ID=`cat $DATA_ID_FILE`
31
32 # Checkout data referenced by id
33 (cd $DATA_DIR && git checkout -B auto $DATA_ID)
34 exit $?