Skip to content

Commit

Permalink
Merge pull request #48 from cfriedt/issue/22/uhd-causing-sigsegv
Browse files Browse the repository at this point in the history
Issue/22/uhd causing sigsegv
  • Loading branch information
cfriedt authored Jul 2, 2017
2 parents fbf8288 + 0108738 commit eb7f102
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,19 @@ function fetch() {

if [ "git" = "${URL:0:3}" -o "" != "${BRANCH}" ]; then
D "downloading to ${TMP_DIR}/${T}"
if [ -d ${TMP_DIR}/${T} ]; then
D "already downloaded ${P}"
verify_checksum "${TMP_DIR}/${T}" "${CKSUM}"
return
if [ ! -d ${TMP_DIR}/${T} ]; then
git clone ${URL} ${TMP_DIR}/${T} \
|| ( rm -Rf ${TMP_DIR}/${T}; E "failed to clone from ${URL}" )
fi
git clone ${URL} ${TMP_DIR}/${T} \
|| ( rm -Rf ${TMP_DIR}/${T}; E "failed to clone from ${URL}" )
git -C ${TMP_DIR}/${T} reset \
&& git -C ${TMP_DIR}/${T} checkout . \
&& git -C ${TMP_DIR}/${T} checkout master \
&& git -C ${TMP_DIR}/${T} fetch \
&& git -C ${TMP_DIR}/${T} pull \
|| ( rm -Rf ${TMP_DIR}/${T}; E "failed to pull from ${URL}" )
if [ "" != "${BRANCH}" ]; then
cd ${TMP_DIR}/${T} \
&& git checkout -b local-${BRANCH} ${BRANCH} \
git -C ${TMP_DIR}/${T} branch -D local-${BRANCH} &> /dev/null
git -C ${TMP_DIR}/${T} checkout -b local-${BRANCH} ${BRANCH} \
|| ( rm -Rf ${TMP_DIR}/${T}; E "failed to checkout ${BRANCH}" )
fi
verify_checksum "${TMP_DIR}/${T}" "${CKSUM}"
Expand Down Expand Up @@ -201,11 +204,7 @@ function unpack() {
fi

if [ "git" = "${URL:0:3}" -o "" != "${BRANCH}" ]; then
I "resetting and checking out files from git"
cd ${TMP_DIR}/${T} \
&& git reset \
&& git checkout . \
|| E "failed to git checkout in ${T}"
I "git repository has been refreshed"
else
local opts=
local cmd=
Expand Down Expand Up @@ -1362,9 +1361,9 @@ fi

P=uhd
URL=git://github.com/EttusResearch/uhd.git
CKSUM=git:c705922a08e32c8b0ec7ef6af6137835f87b2f42
CKSUM=git:25fc32af6585fcbb23ff8d89d0a88c76bc21b3b3
T=${P}
BRANCH=release_003_010_001_001
BRANCH=master

EXTRA_OPTS="-DENABLE_E300=ON -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR}/usr ${TMP_DIR}/${T}/host" \
build_and_install_cmake \
Expand Down

0 comments on commit eb7f102

Please sign in to comment.