Changeset d7390a5 for common


Ignore:
Timestamp:
02/10/2012 09:33:23 AM (12 years ago)
Author:
Pierre Labastie <pierre@…>
Branches:
2.4, ablfs, ablfs-more, legacy, new_features, trunk
Children:
743414b
Parents:
608fbe1
Message:

Changes the logic of "rebuild files" so that jhalfs does not stop if this item is ticked and the build dir is empty

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/common-functions

    r608fbe1 rd7390a5  
    4747clean_builddir() {           #
    4848#----------------------------#
    49   # Test if the clean must be done.
    50   if [ "${CLEAN}" = "y" ]; then
     49# Test if the clean must be done.
     50if [ "${CLEAN}" = "y" ]; then
     51  # If empty (i.e. could contain lost+found), do not do anything
     52  if $(ls $BUILDDIR/* > /dev/null 2>&1) &&
     53       [ "$(ls $BUILDDIR)" != "lost+found" ]; then
    5154    # Test to make sure that the build directory was populated by jhalfs
    5255    if [ ! -d $JHALFSDIR ] || [ ! -d $BUILDDIR/sources ] ; then
     
    5558    # Test that dev filesystems are not mounted in $BUILDDIR
    5659    elif mount | grep $BUILDDIR/dev > /dev/null ; then
    57       echo "Looks like kernel fylesystems are yet mounted on $BUILDDIR."
     60      echo "Looks like kernel filesystems are still mounted on $BUILDDIR."
    5861      exit 1
    5962    else
     
    6164      echo -n "Cleaning $BUILDDIR ..."
    6265      # First delete proc and sys directories, if exist.
    63       # Both should be empty. If not, be sure to exit.
     66      # Both should be empty. If not, we exit, and the rmdir command
     67      # has generated an error message
    6468      if [ -d $BUILDDIR/proc ] ; then
    6569        sudo rmdir $BUILDDIR/proc || exit 1
     
    7882    fi
    7983  fi
     84fi
    8085}
    8186
Note: See TracChangeset for help on using the changeset viewer.