Fixed clean_builddir()
This commit is contained in:
parent
640e48be9f
commit
5468631e31
1 changed files with 11 additions and 14 deletions
|
@ -55,7 +55,7 @@ get_package_tarball_name() { #
|
||||||
echo $(grep "^linux-headers-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
echo $(grep "^linux-headers-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
*) echo $(grep "^$script_name-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
*) echo $(grep "^$script_name-[[:digit:]]" $JHALFSDIR/pkg_tarball_list | head -n1 )
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -420,24 +420,21 @@ clean_builddir() { #
|
||||||
#----------------------------#
|
#----------------------------#
|
||||||
# Test if the clean must be done.
|
# Test if the clean must be done.
|
||||||
if [ "${CLEAN}" = "y" ]; then
|
if [ "${CLEAN}" = "y" ]; then
|
||||||
# Test to make sure we're running the clean as root
|
|
||||||
if [ "$UID" != "0" ] ; then
|
|
||||||
echo "You must be logged in as root to clean the build directory."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
# Test to make sure that the build directory was populated by jhalfs
|
# Test to make sure that the build directory was populated by jhalfs
|
||||||
if [ ! -d $JHALFSDIR ] || [ ! -d $BUILDDIR/sources ] ; then
|
if [ ! -d $JHALFSDIR ] || [ ! -d $BUILDDIR/sources ] ; then
|
||||||
echo "Looks like $BUILDDIR was not populated by a previous jhalfs-X run."
|
echo "Looks like $BUILDDIR was not populated by a previous jhalfs run."
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
# Clean the build directory
|
# Clean the build directory
|
||||||
echo -ne "Cleaning $BUILDDIR...\n"
|
echo -n "Cleaning $BUILDDIR ..."
|
||||||
rm -rf $BUILDDIR/{bin,boot,dev,etc,home,lib,media,mnt,opt,proc,root,sbin,srv,sys,tmp,tools,cross-tools,usr,var}
|
sudo rm -rf $BUILDDIR/{bin,boot,dev,etc,home,lib,media,mnt,opt,proc,root,sbin,srv,sys,tmp,tools,cross-tools,usr,var}
|
||||||
echo -ne "Cleaning $JHALFSDIR...\n"
|
echo "done"
|
||||||
rm -rf $JHALFSDIR/{0*,1*,envars,sources-dir,*commands,*logs,Makefile,*.xsl,makefile-functions,pkg_tarball_list,*.config,*.sh}
|
echo -n "Cleaning $JHALFSDIR ..."
|
||||||
echo -ne "Cleaning remainig extracted sources in $BUILDDIR/sources...\n"
|
sudo rm -rf $JHALFSDIR
|
||||||
rm -rf `find $BUILDDIR/sources/* -maxdepth 0 -type d`
|
echo "done"
|
||||||
echo -ne "done\n"
|
echo -n "Cleaning remainig extracted sources in $BUILDDIR/sources ..."
|
||||||
|
sudo rm -rf `find $BUILDDIR/sources/* -maxdepth 0 -type d`
|
||||||
|
echo "done"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue