mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
72ee60b9d5
For host systems like FreeBSD, bash binary is found in a different path.
26 lines
748 B
Bash
Executable File
26 lines
748 B
Bash
Executable File
#!/usr/bin/env bash
|
|
if [ -z "${PKG_URL}" ]; then
|
|
echo 'export PKG_URL before running this script' >&2
|
|
exit 2
|
|
fi
|
|
if [ -z "${CHECKOUT_FOLDER}" ]; then
|
|
echo 'export CHECKOUT_FOLDER before running this script' >&2
|
|
exit 2
|
|
fi
|
|
|
|
: ${SVN_INFO_FILE:=${CHECKOUT_FOLDER}/svn_info.xml}
|
|
|
|
if [ -s "${SVN_INFO_FILE}" ]; then
|
|
# svn checkout was completed by another thread while we waited for the lock
|
|
if [ "${QUIET}" -ne 1 ]; then
|
|
echo "File already exists: ${SVN_INFO_FILE}, skipping svn checkout"
|
|
fi
|
|
exit 0
|
|
fi
|
|
if [ -n "${PKG_VERSION}" ]; then
|
|
svn checkout -q -r ${PKG_VERSION} ${PKG_URL} ${CHECKOUT_FOLDER}
|
|
else
|
|
svn checkout -q ${PKG_URL} ${CHECKOUT_FOLDER}
|
|
fi
|
|
svn info --xml ${CHECKOUT_FOLDER} > ${SVN_INFO_FILE}
|