3 # Perform a checkout / update the MINIX u-boot git repo if needed
8 while getopts "o:n:?" c
12 echo "Usage: $0 -o output dir -n version " >&2
28 if [ -z "$OUTPUT_DIR" -o -z "$GIT_VERSION" ]
30 echo "Missing required parameters OUTPUT_DIR=$OUTPUT_DIR GIT_VERSION=$GIT_VERSION"
31 echo "Usage: $0 -o output dir -n version " >&2
37 # if the file doesn't exist it's easy , to a checkout
39 if [ ! -e "$OUTPUT_DIR" ]
41 git clone git
://git.minix3.org
/u-boot
-b minix
$OUTPUT_DIR
50 CURRENT_VERSION
=`git rev-parse HEAD`
51 if [ "$CURRENT_VERSION" != "$GIT_VERSION" ]
53 echo "Current version $CURRENT_VERSION does not match wanted $GIT_VERSION performing update and checkout"
55 git checkout
$GIT_VERSION