Ignore:
Timestamp:
10/07/2006 07:11:58 PM (18 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
Children:
5844c27
Parents:
640e48b
Message:

Fixed clean_builddir()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/common-functions

    r640e48b r5468631  
    5656         fi
    5757         ;;
    58      *)  echo $(grep "^$script_name-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 ) 
     58     *)  echo $(grep "^$script_name-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
    5959         ;;
    6060   esac
     
    421421  # Test if the clean must be done.
    422422  if [ "${CLEAN}" = "y" ]; then
    423     # Test to make sure we're running the clean as root
    424     if [ "$UID" != "0" ] ; then
    425       echo "You must be logged in as root to clean the build directory."
    426       exit 1
    427     fi
    428423    # Test to make sure that the build directory was populated by jhalfs
    429424    if [ ! -d $JHALFSDIR ] || [ ! -d $BUILDDIR/sources ] ; then
    430       echo "Looks like $BUILDDIR was not populated by a previous jhalfs-X run."
     425      echo "Looks like $BUILDDIR was not populated by a previous jhalfs run."
    431426      exit 1
    432427    else
    433428      # Clean the build directory
    434       echo -ne "Cleaning $BUILDDIR...\n"
    435       rm -rf $BUILDDIR/{bin,boot,dev,etc,home,lib,media,mnt,opt,proc,root,sbin,srv,sys,tmp,tools,cross-tools,usr,var}
    436       echo -ne "Cleaning $JHALFSDIR...\n"
    437       rm -rf $JHALFSDIR/{0*,1*,envars,sources-dir,*commands,*logs,Makefile,*.xsl,makefile-functions,pkg_tarball_list,*.config,*.sh}
    438       echo -ne "Cleaning remainig extracted sources in $BUILDDIR/sources...\n"
    439       rm -rf `find $BUILDDIR/sources/* -maxdepth 0 -type d`
    440       echo -ne "done\n"
     429      echo -n "Cleaning $BUILDDIR ..."
     430      sudo rm -rf $BUILDDIR/{bin,boot,dev,etc,home,lib,media,mnt,opt,proc,root,sbin,srv,sys,tmp,tools,cross-tools,usr,var}
     431      echo "done"
     432      echo -n "Cleaning $JHALFSDIR ..."
     433      sudo rm -rf $JHALFSDIR
     434      echo "done"
     435      echo -n "Cleaning remainig extracted sources in $BUILDDIR/sources ..."
     436      sudo rm -rf `find $BUILDDIR/sources/* -maxdepth 0 -type d`
     437      echo "done"
    441438    fi
    442439  fi
Note: See TracChangeset for help on using the changeset viewer.