Ignore:
Timestamp:
03/19/2016 08:07:33 PM (9 years ago)
Author:
Pierre Labastie <pierre@…>
Branches:
2.4, ablfs-more, legacy, trunk
Children:
8ebac92
Parents:
4888f0c
Message:

When running BLFS/gen-makefile.sh, the current working directory is emptied.
If this is not the directory you intended to work in, you may erase precious
data. So only erase data in directories whose name begin with "work".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BLFS/gen-makefile.sh

    r4888f0c re253015  
    1010declare PREV_PACKAGE=""
    1111declare BUILD_SCRIPTS=${TOPDIR}/scripts
    12 declare TRACKING_FILE=tracking-dir/instpkg.xml
     12declare TRACKING_FILE=/var/lib/jhalfs/BLFS/instpkg.xml
    1313declare XSLDIR=${TOPDIR}/xsl
    1414declare PACK_FILE=${TOPDIR}/packages.xml
     
    157157
    158158if [[ ! -d ${BUILD_SCRIPTS} ]] ; then
    159   echo -e "\n\tThe \'${BUILD_SCRIPTS}\' directory has not been found.\n"
     159  echo -e "\n\tThe '${BUILD_SCRIPTS}' directory has not been found.\n"
    160160  exit 1
    161161fi
    162162
    163 # Let us make a clean base:
     163# Let us make a clean base, but first ensure that we are
     164# not emptying a useful directory.
     165MYDIR=$(pwd)
     166MYDIR=$(basename $MYDIR)
     167if [ "${MYDIR#work}" = "${MYDIR}" ] ; then
     168  echo -e \\n\\tDirectory ${BOLD}$MYDIR${OFF} does not begin with \"work\"\\n
     169  exit 1
     170fi
     171
    164172rm -rf *
    165173
Note: See TracChangeset for help on using the changeset viewer.