Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl3/gcc script to copy gcc to gcc.old, ready for i...
details: https://anonhg.NetBSD.org/src/rev/40df1cff733d
branches: trunk
changeset: 327060:40df1cff733d
user: mrg <mrg%NetBSD.org@localhost>
date: Wed Feb 26 10:50:23 2014 +0000
description:
script to copy gcc to gcc.old, ready for importing.
diffstat:
external/gpl3/gcc/gcc2gcc.old | 63 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 63 insertions(+), 0 deletions(-)
diffs (67 lines):
diff -r 00adb570d25c -r 40df1cff733d external/gpl3/gcc/gcc2gcc.old
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/gcc2gcc.old Wed Feb 26 10:50:23 2014 +0000
@@ -0,0 +1,63 @@
+#! /bin/sh
+#
+# $NetBSD: gcc2gcc.old,v 1.1 2014/02/26 10:50:23 mrg Exp $
+
+# run it like eg:
+#
+# % ./gcc2gcc.old /usr/src/external/gpl3/gcc /home/import/gcc
+
+doit=echo
+doit=
+
+progname="$(basename "$0")"
+
+usage() {
+ echo "Usage: $progname src/external/gpl3/gcc <copy-to-dir>" 1>&2
+ edho "Note that copy-to-dir must not exist." 1>&2
+ exit 1
+}
+
+#set -x
+set -e
+
+srcdir="$1"
+destdir="$2"
+
+if [ -z "$srcdir" -o -z "$destdir" ]; then
+ usage
+fi
+
+if [ ! -d "$srcdir" ]; then
+ echo "srcdir '$srcdir' is not a directory" 1>&2
+ usage
+fi
+if [ -e "$destdir" ]; then
+ echo "destdir '$destdir' is something" 1>&2
+ ls -ld "$destdir"
+ usage
+fi
+
+# Assumes that ../gcc/. == .
+cd "$srcdir"/..
+if [ ! -d gcc ]; then
+ echo "$srcdir/../gcc doesn't exist." 1>&2
+ usage
+fi
+
+echo "Copying files to $destdir..."
+$doit pax -rwpp gcc "$destdir"
+
+
+# clean the copy
+echo "Cleaning CVS turds and ChangeLogs"
+$doit find "$destdir" -name .CVS -exec rm -rf {} +
+$doit find "$destdir" -name CVS -exec rm -rf {} +
+$doit find "$destdir" -name "ChangeLog*" -exec rm -f {} +
+$doit rm -f "$destdir"/gcc2netbsd "$destdir"/gcc2gcc.old
+
+date=$(date +%Y%m%M-%H%M)
+echo GCC copied to gcc.old. use these commands to import:
+echo cd "$destdir/gcc"
+echo cvs import src/external/gpl3/gcc.old NetBSD src-external-gpl3-gcc-$date
+
+exit 0
Home |
Main Index |
Thread Index |
Old Index