summaryrefslogtreecommitdiff
path: root/scripts/saveSample.sh
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2007-05-19 22:52:47 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2007-05-19 22:52:47 (GMT)
commitaa6ae43fd73be9e1d6fa02326b2ad4ebb52b96a9 (patch)
tree96298fbfa89b15017f2bdf73a8f2acecca4b888d /scripts/saveSample.sh
parent361c6173087b814a47492671521d74684d959734 (diff)
Add uClibc-0.9.29:
- associated patch set - update the munging function to accomodate the new config variables libfloat version was missing from the previous commit... :-( Better handle the case where the sample directory already exist but isn't under revision control, and in case the destination file doesn't exist in the sample directory.
Diffstat (limited to 'scripts/saveSample.sh')
-rwxr-xr-xscripts/saveSample.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/saveSample.sh b/scripts/saveSample.sh
index d7f27f3..1771ba8 100755
--- a/scripts/saveSample.sh
+++ b/scripts/saveSample.sh
@@ -30,7 +30,13 @@ CT_DoBuildTargetTriplet
. "${CT_TOP_DIR}/.config"
# Create the sample directory
-[ -d "${CT_TOP_DIR}/samples/${CT_TARGET}" ] || svn mkdir "${CT_TOP_DIR}/samples/${CT_TARGET}" >/dev/null 2>&1
+# In case it was manually made, add it to svn
+if [ -d "${CT_TOP_DIR}/samples/${CT_TARGET}" ]; then
+ # svn won't fail when adding a directory already managed by svn
+ svn add "${CT_TOP_DIR}/samples/${CT_TARGET}" >/dev/null 2>&1
+else
+ svn mkdir "${CT_TOP_DIR}/samples/${CT_TARGET}" >/dev/null 2>&1
+fi
# Save the crosstool-NG config file
cp "${CT_TOP_DIR}/.config" "${CT_TOP_DIR}/samples/${CT_TARGET}/crosstool.config"
@@ -42,7 +48,7 @@ CT_DoAddFileToSample() {
source="$1"
dest="$2"
inode_s=`ls -i "${source}"`
- inode_d=`ls -i "${dest}"`
+ inode_d=`ls -i "${dest}" 2>/dev/null || true`
if [ "${inode_s}" != "${inode_d}" ]; then
cp "${source}" "${dest}"
fi