scripts/saveSample.sh
changeset 301 2be7232a73ac
parent 165 a291bfa17715
child 335 f0d84f1d4c93
     1.1 --- a/scripts/saveSample.sh	Sat Jun 16 22:23:53 2007 +0000
     1.2 +++ b/scripts/saveSample.sh	Sat Jul 28 21:34:41 2007 +0000
     1.3 @@ -8,7 +8,7 @@
     1.4  #  - the kernel .config file if specified
     1.5  #  - the uClibc .config file if uClibc selected
     1.6  
     1.7 -. "${CT_TOP_DIR}/scripts/functions"
     1.8 +. "${CT_LIB_DIR}/scripts/functions"
     1.9  
    1.10  # Don't care about any log file
    1.11  exec >/dev/null
    1.12 @@ -31,12 +31,8 @@
    1.13  CT_LOG_LEVEL_MAX="INFO"
    1.14  
    1.15  # Create the sample directory
    1.16 -# In case it was manually made, add it to svn
    1.17 -if [ -d "${CT_TOP_DIR}/samples/${CT_TARGET}" ]; then
    1.18 -    # svn won't fail when adding a directory already managed by svn
    1.19 -    svn add "${CT_TOP_DIR}/samples/${CT_TARGET}" >/dev/null 2>&1
    1.20 -else
    1.21 -    svn mkdir "${CT_TOP_DIR}/samples/${CT_TARGET}" >/dev/null 2>&1
    1.22 +if [ ! -d "${CT_TOP_DIR}/samples/${CT_TARGET}" ]; then
    1.23 +    mkdir -p "${CT_TOP_DIR}/samples/${CT_TARGET}"
    1.24  fi
    1.25  
    1.26  # Save the crosstool-NG config file
    1.27 @@ -53,19 +49,24 @@
    1.28      if [ "${inode_s}" != "${inode_d}" ]; then
    1.29          cp "${source}" "${dest}"
    1.30      fi
    1.31 -    svn add "${dest}" >/dev/null 2>&1
    1.32  }
    1.33  
    1.34 +if [ "${CT_TOP_DIR}" = "${CT_LIB_DIR}" ]; then
    1.35 +    samp_top_dir="\${CT_LIB_DIR}"
    1.36 +else
    1.37 +    samp_top_dir="\${CT_TOP_DIR}"
    1.38 +fi
    1.39 +
    1.40  # Save the kernel .config file
    1.41  if [ -n "${CT_KERNEL_LINUX_CONFIG_FILE}" ]; then
    1.42      # We save the file, and then point the saved sample to this file
    1.43      CT_DoAddFileToSample "${CT_KERNEL_LINUX_CONFIG_FILE}" "${CT_TOP_DIR}/samples/${CT_TARGET}/${CT_KERNEL}-${CT_KERNEL_VERSION}.config"
    1.44 -    sed -r -i -e 's|^(CT_KERNEL_LINUX_CONFIG_FILE=).+$|\1"${CT_TOP_DIR}/samples/${CT_TARGET}/${CT_KERNEL}-${CT_KERNEL_VERSION}.config"|;' \
    1.45 +    sed -r -i -e 's|^(CT_KERNEL_LINUX_CONFIG_FILE=).+$|\1"'"${samp_top_dir}"'/samples/${CT_TARGET}/${CT_KERNEL}-${CT_KERNEL_VERSION}.config"|;' \
    1.46          "${CT_TOP_DIR}/samples/${CT_TARGET}/crosstool.config"
    1.47  else
    1.48      # remove any dangling files
    1.49      for f in "${CT_TOP_DIR}/samples/${CT_TARGET}/${CT_KERNEL}-"*.config; do
    1.50 -        if [ -f "${f}" ]; then svn rm --force "${f}" >/dev/null 2>&1; fi
    1.51 +        if [ -f "${f}" ]; then rm -f "${f}"; fi
    1.52      done
    1.53  fi
    1.54  
    1.55 @@ -73,17 +74,11 @@
    1.56  if [ -n "${CT_LIBC_UCLIBC_CONFIG_FILE}" ]; then
    1.57      # We save the file, and then point the saved sample to this file
    1.58      CT_DoAddFileToSample "${CT_LIBC_UCLIBC_CONFIG_FILE}" "${CT_TOP_DIR}/samples/${CT_TARGET}/${CT_LIBC}-${CT_LIBC_VERSION}.config"
    1.59 -    sed -r -i -e 's|^(CT_LIBC_UCLIBC_CONFIG_FILE=).+$|\1"${CT_TOP_DIR}/samples/${CT_TARGET}/${CT_LIBC}-${CT_LIBC_VERSION}.config"|;' \
    1.60 +    sed -r -i -e 's|^(CT_LIBC_UCLIBC_CONFIG_FILE=).+$|\1"'"${samp_top_dir}"'/samples/${CT_TARGET}/${CT_LIBC}-${CT_LIBC_VERSION}.config"|;' \
    1.61          "${CT_TOP_DIR}/samples/${CT_TARGET}/crosstool.config"
    1.62  else
    1.63      # remove any dangling files
    1.64      for f in "${CT_TOP_DIR}/samples/${CT_TARGET}/${CT_LIBC}-"*.config; do
    1.65 -        if [ -f "${f}" ]; then svn rm --force "${f}" >/dev/null 2>&1; fi
    1.66 +        if [ -f "${f}" ]; then rm -f "${f}"; fi
    1.67      done
    1.68  fi
    1.69 -
    1.70 -# We could svn add earlier, but it's better to
    1.71 -# add a frozen file than modifying it later
    1.72 -svn add "${CT_TOP_DIR}/samples/${CT_TARGET}/crosstool.config" >/dev/null 2>&1
    1.73 -
    1.74 -svn stat "${CT_TOP_DIR}/samples/${CT_TARGET}" 2>/dev/null |CT_DoLog INFO