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