Navigation Menu

Skip to content

Commit

Permalink
merge script changes
Browse files Browse the repository at this point in the history
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
  • Loading branch information
RobertCNelson committed Nov 14, 2012
1 parent 9eaf7f8 commit c071fed
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion scripts/git.sh
Expand Up @@ -51,11 +51,21 @@ git_kernel () {
#In the past some users set LINUX_GIT = DIR, fix that...
if [ -f "${LINUX_GIT}/version.sh" ] ; then
unset LINUX_GIT
echo "Warning: LINUX_GIT is set as DIR:"
check_and_or_clone
fi

#is the git directory user writable?
if [ ! -w "${LINUX_GIT}" ] ; then
unset LINUX_GIT
echo "Warning: LINUX_GIT is not writable:"
check_and_or_clone
fi

#is it actually a git repo?
if [ ! -f "${LINUX_GIT}/.git/config" ] ; then
unset LINUX_GIT
echo "Warning: LINUX_GIT is an invalid tree:"
check_and_or_clone
fi

Expand All @@ -67,7 +77,13 @@ git_kernel () {
git fetch || true
cd -

if [ ! -f ${DIR}/KERNEL/.git/config ] ; then
if [ ! -f "${DIR}/KERNEL/.git/config" ] ; then
rm -rf ${DIR}/KERNEL/ || true
git clone --shared ${LINUX_GIT} ${DIR}/KERNEL
fi

#Automaticly, just recover the git repo from a git crash
if [ -f "${DIR}/KERNEL/.git/index.lock" ] ; then
rm -rf ${DIR}/KERNEL/ || true
git clone --shared ${LINUX_GIT} ${DIR}/KERNEL
fi
Expand Down

0 comments on commit c071fed

Please sign in to comment.