Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/atf Adjust for import of atf 0.19.
details: https://anonhg.NetBSD.org/src/rev/fca6feeb3811
branches: trunk
changeset: 326631:fca6feeb3811
user: jmmv <jmmv%NetBSD.org@localhost>
date: Sat Feb 08 19:06:05 2014 +0000
description:
Adjust for import of atf 0.19.
- Delete some unnecessary files.
- Print out both the list of deleted files and added files in the import.
Useful when adjusting file lists and the reachover Makefiles.
diffstat:
external/bsd/atf/prepare-import.sh | 35 ++++++++++++++++++++---------------
1 files changed, 20 insertions(+), 15 deletions(-)
diffs (63 lines):
diff -r ada51b913dd9 -r fca6feeb3811 external/bsd/atf/prepare-import.sh
--- a/external/bsd/atf/prepare-import.sh Sat Feb 08 15:50:29 2014 +0000
+++ b/external/bsd/atf/prepare-import.sh Sat Feb 08 19:06:05 2014 +0000
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: prepare-import.sh,v 1.6 2012/01/16 22:42:40 jmmv Exp $
+# $NetBSD: prepare-import.sh,v 1.7 2014/02/08 19:06:05 jmmv Exp $
#
# Use this script to recreate the 'dist' subdirectory from a newly released
# distfile. The script takes care of unpacking the distfile, removing any
@@ -21,6 +21,7 @@
CLEAN_PATTERNS="${CLEAN_PATTERNS} bootstrap"
CLEAN_PATTERNS="${CLEAN_PATTERNS} configure*"
CLEAN_PATTERNS="${CLEAN_PATTERNS} m4"
+CLEAN_PATTERNS="${CLEAN_PATTERNS} tools/generate-revision.sh"
err() {
echo "${ProgName}:" "${@}" 1>&2
@@ -66,26 +67,30 @@
local old_dir="${1}"; shift
local new_dir="${1}"; shift
- local old_list=$(mktemp -t atf-import.XXXXXX)
- local new_list=$(mktemp -t atf-import.XXXXXX)
- local diff=$(mktemp -t atf-import.XXXXXX)
- trap "rm -f '${old_list}' '${new_list}' '${diff}'; exit 1" \
- HUP INT QUIT TERM
+ local tmpdir="$(mktemp -d -t atf-import)"
+ trap "rm -rf '${tmpdir}'; exit 1" HUP INT QUIT TERM
+
+ local old_list="${tmpdir}/old-list.txt"
+ ( cd "${old_dir}" && find . -type f | sort >>"${old_list}" )
+ local new_list="${tmpdir}/new-list.txt"
+ ( cd "${new_dir}" && find . -type f | sort >>"${new_list}" )
- ( cd "${old_dir}" && find . | sort >>"${old_list}" )
- ( cd "${new_dir}" && find . | sort >>"${new_list}" )
-
- diff -u "${old_list}" "${new_list}" | grep '^+\.' >>"${diff}" || true
- if [ -s "${diff}" ]; then
+ local added="${tmpdir}/added.txt"
+ comm -13 "${old_list}" "${new_list}" >"${added}"
+ local removed="${tmpdir}/removed.txt"
+ comm -23 "${old_list}" "${new_list}" | grep -v '/CVS' >"${removed}"
+ if [ -s "${removed}" ]; then
+ log "Removed files found"
+ cat "${removed}"
+ fi
+ if [ -s "${added}" ]; then
log "New files found"
- diff -u "${old_list}" "${new_list}" | grep '^+\.'
+ cat "${added}"
log "Check if any files have to be cleaned up and update" \
"the prepare-import.sh script accordingly"
- else
- log "No new files; all good!"
fi
- rm -f "${old_list}" "${new_list}" "${diff}"
+ rm -rf "${tmpdir}"
}
main() {
Home |
Main Index |
Thread Index |
Old Index