summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-11-03 14:37:31 -0800
committerJason Zaugg <jzaugg@gmail.com>2013-11-03 14:37:31 -0800
commit50a5cc2249297b9dd2dcfffcce7f0c6669ad460b (patch)
treeef3af11310f80bb129558a46c19e548a798477e2
parentc7e74afb3fd0f8a218ac15506458c5e179e25de4 (diff)
parent08c6a9b6b071a4d09b3a5718e3413e6810f0946e (diff)
downloadscala-50a5cc2249297b9dd2dcfffcce7f0c6669ad460b.tar.gz
scala-50a5cc2249297b9dd2dcfffcce7f0c6669ad460b.tar.bz2
scala-50a5cc2249297b9dd2dcfffcce7f0c6669ad460b.zip
Merge pull request #3083 from retronym/topic/tools-autumn-clean
Cleanup tools/*
-rwxr-xr-xtools/buildcp11
-rwxr-xr-xtools/diffPickled51
-rwxr-xr-xtools/epfl-build28
-rwxr-xr-xtools/epfl-publish32
-rwxr-xr-xtools/locker_scala6
-rwxr-xr-xtools/locker_scalac6
-rwxr-xr-xtools/lockercp4
-rw-r--r--tools/make-release-notes.scala129
-rwxr-xr-xtools/packcp5
-rwxr-xr-xtools/quick_scala6
-rwxr-xr-xtools/quick_scalac6
-rwxr-xr-xtools/quickcp4
-rwxr-xr-xtools/remotetest230
-rwxr-xr-xtools/showPickled32
-rwxr-xr-xtools/starr_scala6
-rwxr-xr-xtools/starr_scalac6
-rwxr-xr-xtools/starrcp5
-rwxr-xr-xtools/strapcp11
-rwxr-xr-xtools/test-renamer82
-rwxr-xr-xtools/updatescalacheck130
20 files changed, 0 insertions, 790 deletions
diff --git a/tools/buildcp b/tools/buildcp
deleted file mode 100755
index 3ae70e10a3..0000000000
--- a/tools/buildcp
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-#
-
-[[ $# -eq 1 ]] || { echo "Usage: $0 <locker|quick|...>"; exit 0; }
-
-dir=$(dirname $0)
-lib=$($dir/abspath $dir/../lib)
-build=$($dir/abspath $dir/../build)
-cp=$($dir/cpof $build/$1/classes):$build/asm/classes
-
-echo $cp:$lib/forkjoin.jar:$lib/jline.jar:$lib/extra/'*'
diff --git a/tools/diffPickled b/tools/diffPickled
deleted file mode 100755
index b4a345dc7d..0000000000
--- a/tools/diffPickled
+++ /dev/null
@@ -1,51 +0,0 @@
-#!/bin/sh
-#
-# Shows the difference in pickler output between two variations on a class.
-#
-# If quick and strap are built normally you can run
-#
-# diffPickled foo.bar.Baz
-#
-# to see any differences between them in that class.
-
-USAGE="Usage: $0 classpath1 classpath2 class"
-TOOLSDIR=`dirname $0`
-BUILDDIR="${TOOLSDIR}/../build"
-QUICKDIR="${BUILDDIR}/quick"
-STRAPDIR="${BUILDDIR}/strap"
-
-CP1=""
-CP2=""
-CLASS=""
-
-if [ $# == 1 ] ; then
- if [ -e ${QUICKDIR} ] && [ -e ${STRAPDIR} ] ; then
- CP1=`${TOOLSDIR}/quickcp`
- CP2=`${TOOLSDIR}/strapcp`
- CLASS=$1
- else
- echo $USAGE
- echo "(If only one argument is given, $QUICKDIR and $STRAPDIR must exist.)"
- exit 1
- fi
-elif [ $# == 3 ] ; then
- CP1=$1
- CP2=$2
- CLASS=$3
-else
- echo $USAGE
- exit 1
-fi
-
-TMPDIR="/tmp/scala_pickle_diff${RANDOM}"
-
-if mkdir -m 0700 "$TMPDIR" 2>/dev/null ; then
- ${TOOLSDIR}/showPickled -cp $CP1 $CLASS > "${TMPDIR}/out1.txt"
- ${TOOLSDIR}/showPickled -cp $CP2 $CLASS > "${TMPDIR}/out2.txt"
- diff "${TMPDIR}/out1.txt" "${TMPDIR}/out2.txt"
- rm -rf ${TMPDIR}
-else
- echo "Failed to create temporary directory ${TMPDIR}."
- exit 1
-fi
-
diff --git a/tools/epfl-build b/tools/epfl-build
deleted file mode 100755
index dd66307de3..0000000000
--- a/tools/epfl-build
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/usr/bin/env bash
-#
-# builds nightlies
-
-[[ $# -gt 0 ]] || {
- cat <<EOM
-Usage: $0 <version> [opt opt ...]
-
- Everything after the version is supplied to scalac and partest.
- Example: $0 -Xcheckinit -Ycheck:all
-
-Environment variables:
- extra_ant_targets Additional ant targets to run after nightly
-
-EOM
- exit 0
-}
-
-# version isn't actually used at present.
-scalaVersion="$1" && shift
-scalaArgs="-Dscalac.args=\"$@\" -Dpartest.scalac_opts=\"$@\""
-
-ant all.clean && ./pull-binary-libs.sh
-
-ant $scalaArgs build-opt &&
-ant $scalaArgs nightly &&
-for target in $extra_ant_targets; do ant $target ; done
-# [[ -n "$BUILD_DOCSCOMP" ]] && ant docscomp
diff --git a/tools/epfl-publish b/tools/epfl-publish
deleted file mode 100755
index cdf18823a5..0000000000
--- a/tools/epfl-publish
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/env bash
-#
-# publishes nightly build if $publish_to is set in environment.
-#
-
-[[ $# -eq 1 ]] || {
- cat <<EOM
-Usage: $0 <scala version>
-
-Environment variables:
- publish_to rsync destination
-EOM
- exit 0
-}
-version="$1"
-
-[[ -d dists/archives ]] || {
- echo "Can't find build, has it completed? No directory at dists/archives"
- exit 1
-}
-
-if [[ -z $publish_to ]]; then
- echo "Nothing to publish."
-else
- echo "Publishing nightly build to $publish_to"
- # Archive Scala nightly distribution
- rsync -az --exclude scala-latest-sources.tgz dists/archives/ "$publish_to/distributions"
- # only publish scaladoc nightly for trunk
- [[ $version == "master" ]] && rsync -az build/scaladoc/ "$publish_to/docs"
- # sbaz
- [[ -d dists/sbaz ]] && rsync -az dists/sbaz/ "$publish_to/sbaz"
-fi
diff --git a/tools/locker_scala b/tools/locker_scala
deleted file mode 100755
index 02d2efcdd8..0000000000
--- a/tools/locker_scala
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-#
-
-CP=$($(dirname $BASH_SOURCE)/lockercp)
-
-java $JAVA_OPTS -classpath "$CP" scala.tools.nsc.MainGenericRunner -usejavacp "$@"
diff --git a/tools/locker_scalac b/tools/locker_scalac
deleted file mode 100755
index c4b28b7bc0..0000000000
--- a/tools/locker_scalac
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-#
-
-CP=$($(dirname $BASH_SOURCE)/lockercp)
-
-java $JAVA_OPTS -classpath "$CP" scala.tools.nsc.Main -usejavacp "$@"
diff --git a/tools/lockercp b/tools/lockercp
deleted file mode 100755
index 43c72dd629..0000000000
--- a/tools/lockercp
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-#
-
-$(dirname $0)/buildcp locker
diff --git a/tools/make-release-notes.scala b/tools/make-release-notes.scala
deleted file mode 100644
index 3e5b60d223..0000000000
--- a/tools/make-release-notes.scala
+++ /dev/null
@@ -1,129 +0,0 @@
-#!/bin/sh
-exec scala -feature $0 $@
-!#
-
-import sys.process._
-
-val tag1 = "v2.10.0-M4"
-val tag2 = "v2.10.0-M5"
-
-// Git commit parsing magikz
-
-case class Commit(sha: String, author: String, header: String, body: String) {
- override def toString = " * " + sha + " (" + author + ") " + header + " - " + body.take(5) + " ..."
-}
-
-val gitFormat = "--format=format:*-*%h``%aN``%s``%b"
-
-def processGitCommits(input: String): IndexedSeq[Commit] =
- ((input split "[\\r\\n]*\\*\\-\\*").view map (_ split "``") collect {
- case Array(sha, author, hdr, msg) => Commit(sha, author, hdr, msg)
- }).toVector
-
-val commits =
- processGitCommits(Process(Seq("git", "log", tag1+".."+tag2,"--format=format:*-*%h``%aN``%s``%b","--no-merges")).!!)
-
-val authors: Seq[(String, Int)] = {
- val grouped: Vector[(String,Int)] = (commits groupBy (_.author)).map { case (a,c) => a -> c.length }{collection.breakOut}
- (grouped sortBy (_._2)).reverse
-}
-
-def hasFixins(msg: String): Boolean = (
- (msg contains "SI-") /*&& ((msg.toLowerCase contains "fix") || (msg.toLowerCase contains "close"))*/
-)
-
-val fixCommits =
- for {
- commit <- commits
- searchString = commit.body + commit.header
- if hasFixins(searchString)
- } yield commit
-
-
-val siPattern = java.util.regex.Pattern.compile("(SI-[0-9]+)")
-
-def fixLinks(commit: Commit): String = {
- val searchString = commit.body + commit.header
- val m = siPattern matcher searchString
- val issues = new collection.mutable.ArrayBuffer[String]
- while(m.find()) {
- issues += (m group 1)
- }
- issues map (si => """<a href="https://issues.scala-lang.org/browse/%s">%s</a>""" format (si, si)) mkString ", "
-}
-
-
-// HTML Generation for Toni
-
-def commitShaLink(sha: String) =
- """<a href="https://github.com/scala/scala/commit/%s">%s</a>""" format (sha,sha)
-
-def printBlankLine(): Unit = println("<p>&nbsp</p>")
-def printHeader4(msg: String): Unit = println("<h4>%s</h4>" format (msg))
-
-def printCommiterList(): Unit = {
- printBlankLine()
- printHeader4("Special thanks to all the contribtuors!")
- println("""<table border="0" cellspacing="0" cellpadding="1">
- <thead><tr><th>#</th><th align="left">Author</th></tr></thead>
- <tbody>""")
- for((author, count) <- authors)
- println("""<tr><td align="right">%d &nbsp;</td><td>%s</td></tr>""" format (count, author))
- println("""</tbody>
-</table>""")
-}
-
-def printCommitList(): Unit = {
- printBlankLine()
- printHeader4("Complete commit list!")
- println("""<table border="0" cellspacing="0" cellpadding="1">
- <thead><tr><th>sha</th><th align="left">Title</th></tr></thead>
- <tbody>""")
- for(commit <- commits) {
- println("<tr>")
- println("""<td align="right">%s&nbsp;</td><td>%s</td>""" format (commitShaLink(commit.sha), commit.header))
- /*print("<td>")
- (commit.body split "[\\r\\n]") foreach { line =>
- print(line)
- print("<br/>")
- }
- print("</td>")*/
- println("""</tr>""")
- }
- println("""</tbody>
-</table>""")
-}
-
-def issueFixPrinter(): Unit = {
- printBlankLine()
- printHeader4("Here's a list of isssues that have been fixed since %s" format (tag1))
- println("""<table border="0" cellspacing="0" cellpading="1">
- <thead><tr><th>Issue(s)</th><th>Commit</th><th>Message</th></tr></thead>
- <tbody>""")
- for(commit <- fixCommits) {
- println("""<tr><td>%s&nbsp;</td><td>%s&nbsp;</td><td>%s</td></tr>""" format(fixLinks(commit), commitShaLink(commit.sha), commit.header))
- }
- println("""</tbody>
-</table>""")
- printBlankLine()
-}
-
-def printHTML(): Unit = {
- println("""<html>
- <head>
- <title>%s - Release notes</title>
- </head>
- <body>
- <h3>A new release of Scala is available! Please point your build tools at %s</h3>
- <p>:: INSERT HAND GENERATED NOTES HERE ::</p>
-""" format(tag2, tag2 drop 1))
- issueFixPrinter()
- printCommiterList()
- printCommitList()
- println("""</body></html>""")
-}
-
-printHTML()
-
-
-
diff --git a/tools/packcp b/tools/packcp
deleted file mode 100755
index ecc7ee1b5d..0000000000
--- a/tools/packcp
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-#
-
-dir=$(dirname $0)
-$dir/cpof $dir/../build/pack/lib
diff --git a/tools/quick_scala b/tools/quick_scala
deleted file mode 100755
index 16938ddba4..0000000000
--- a/tools/quick_scala
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-#
-
-CP=$($(dirname $BASH_SOURCE)/quickcp)
-
-java $JAVA_OPTS -classpath "$CP" scala.tools.nsc.MainGenericRunner -usejavacp "$@"
diff --git a/tools/quick_scalac b/tools/quick_scalac
deleted file mode 100755
index 1b9a036c18..0000000000
--- a/tools/quick_scalac
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-#
-
-CP=$($(dirname $BASH_SOURCE)/quickcp)
-
-java $JAVA_OPTS -classpath "$CP" scala.tools.nsc.Main -usejavacp "$@"
diff --git a/tools/quickcp b/tools/quickcp
deleted file mode 100755
index 25d46e56d9..0000000000
--- a/tools/quickcp
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-#
-
-$(dirname $0)/buildcp quick
diff --git a/tools/remotetest b/tools/remotetest
deleted file mode 100755
index fb89794c30..0000000000
--- a/tools/remotetest
+++ /dev/null
@@ -1,230 +0,0 @@
-
-
-#
-# Remote build&test script.
-# Author: Aleksandar Prokopec
-#
-
-
-SCRIPTNAME="..:: RemoteTest ::.."
-DESC="This script pushes the current git repo to a remote bare repo. \
-It then checks out the source tree in a workspace repo and starts the\
- build and all the tests. It can also initialize the remote bare repo\
- and the workspace repo. It assumes that the current repo refspec has\
- been set for the remote bare repository - .git/config of the current\
- repo must have a remote called <server> and the corresponding master\
- branch. Git should, naturally, be installed on both systems.\
- "
-USAGE=" Usage: remotetest (--help|--init|--all|--incr|--clear) <user> <server> <bare-repo-path> <workspace-repo-path> [logfile]"
-
-
-
-function title()
-{
- echo
- echo $SCRIPTNAME
- echo
-}
-
-function usage()
-{
- title
- echo $DESC
- echo
- echo $USAGE
-}
-
-
-function error()
-{
- echo $1
- echo "Failed."
- exit 1
-}
-
-function success()
-{
- echo "Success!"
- exit 0
-}
-
-function instruct()
-{
- usage
- error
-}
-
-function help()
-{
- usage
- echo
- echo "Make sure you have git installed on both your computer and the server, as well as java and ant."
- echo "Add your ssh key to the list of authorized keys on the server (see .ssh dir in your home). This is not required, but makes life easier, as you will have to answer fewer passwords."
- echo "To initialize the remote repositories on a server 'server.url.com', see the following example:"
- echo
- echo "> tools/remotetest --init jack server.url.com ~jack/git-repos-dir/scala ~jack/tmp-build-dir/scala"
- echo
- echo "If you decide you no longer want this remote repository to be tracked (this also tries to delete remote repos on the server):"
- echo
- echo "> tools/remotetest --clear jack server.url.com ~jack/git-repos-dir/scala ~jack/tmp-build-dir/scala"
- echo
- echo "Once the initialization is successful, simply run: "
- echo
- echo "> tools/remotetest --all jack server.url.com ~jack/git-repos-dir/scala ~jack/tmp-build-dir/scala"
- echo
- echo "Optionally, build and test results will be saved into the logfile on the server (an additional, last argument). Be aware that problems arise should you push an ammended commit over a previously pushed commit - this has nothing to do with this script per se."
- echo
- echo " Example workflow:"
- echo
- echo " ------------------- "
- echo " | | "
- echo " V | "
- echo " init ---> [ all | incr ] ---> clear "
- echo
- echo "Complete argument list:"
- echo " --help prints this help"
- echo " --init initializes remote repos"
- echo " --clear deletes remote repos and removes the remote repo reference from local git repo"
- echo " --all pushes the newest version, checks it out at the server, cleans all, builds and tests"
- echo " --incr incremental does the same as --all, but does not clean the directory before testing"
-}
-
-
-if [ $# -lt 1 ]
-then
- instruct
-fi
-
-
-
-if [ $# -lt 5 ]
-then
- if [[ $1 = "--help" ]]
- then
- help
- success
- else
- instruct
- fi
-fi
-
-COMMAND=$1
-USER=$2
-LOCATION=$3
-BAREREPO=$4
-WORKREPO=$5
-LOGFILE=$6
-
-
-if [[ $COMMAND = "--help" ]]
-then
- help
- success
-fi
-
-
-
-
-#
-# Init
-#
-
-
-if [[ $COMMAND = "--init" ]]
-then
- echo "Initializing."
-
- # init bare repo
- ssh $USER@$LOCATION "mkdir $BAREREPO"
- ssh $USER@$LOCATION "cd $BAREREPO; git init; git config --bool core.bare true"
- if [ $? -ne 0 ]
- then
- error "Could not initialize bare repo."
- fi
-
- # add remote bare repo
- git remote add $LOCATION $USER@$LOCATION:$BAREREPO
-
- # push to bare repo
- git push $LOCATION master
- if [ $? -ne 0 ]
- then
- error "Could not push to bare repo."
- fi
-
- # init and checkout work repo
- ssh $USER@$LOCATION "git clone $BAREREPO $WORKREPO"
- if [ $? -ne 0 ]
- then
- error "Could not init working repo."
- fi
-
- success
-fi
-
-
-
-
-#
-# Clear.
-#
-
-
-if [[ $COMMAND = "--clear" ]]
-then
- echo "Clearing remote and deleting remote repos."
- git remote rm $LOCATION
- ssh $USER@$LOCATION "rm -rf $BAREREPO"
- ssh $USER@$LOCATION "cd $WORKREPO; ant all.clean; rm -rf $WORKREPO"
-
- echo "Removed remote repo $LOCATION."
- success
-fi
-
-
-
-
-#
-# Test.
-#
-
-
-if [[ $COMMAND = "--all" || $COMMAND = "--incr" ]]
-then
- # proceed
- echo "Starting remote build and testing."
-else
- error "Unrecognized command $COMMAND."
-fi
-
-# if it's not the init operation, proceed normally
-# push to remote bare repo
-git push $LOCATION master
-if [ $? -ne 0 ]
-then
- error "Could not push to bare repo - push from local machine failed."
-fi
-
-# remotely checkout the repo
-ssh $USER@$LOCATION "cd $WORKREPO; git pull origin master"
-if [ $? -ne 0 ]
-then
- error "Could not remotely pull from bare repo to work repo."
-fi
-
-# clean the build dir if not incremental
-if [[ $COMMAND = "--all" ]]
-then
- ssh $USER@$LOCATION "cd $WORKREPO; ant all.clean"
-fi
-
-# run the build and tests
-SET_ANT_OPTS='export ANT_OPTS="-XX:MaxPermSize=192M -Xmx1536m"; echo $ANT_OPTS'
-echo "Set ant options command: $SET_ANT_OPTS"
-ssh $USER@$LOCATION "cd $WORKREPO; $SET_ANT_OPTS; ant nightly | tee -a $LOGFILE"
-
-success
-
-
-
-
diff --git a/tools/showPickled b/tools/showPickled
deleted file mode 100755
index 27421c3ae5..0000000000
--- a/tools/showPickled
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-#
-# Shows the pickled scala data in a classfile.
-
-if [ $# == 0 ] ; then
- echo "Usage: $0 [--bare] [-cp classpath] <class*>"
- exit 1
-fi
-
-TOOLSDIR=`dirname $0`
-CPOF="$TOOLSDIR/cpof"
-
-PACK="$TOOLSDIR/../build/pack/lib"
-QUICK="$TOOLSDIR/../build/quick/classes"
-STARR="$TOOLSDIR/../lib"
-CP=""
-
-if [ -f "${PACK}/scala-library.jar" ] ; then
- CP=`${TOOLSDIR}/packcp`
-elif [ -d "${QUICK}/library" ] ; then
- CP=`${TOOLSDIR}/quickcp`
-else
- CP=`${TOOLSDIR}/starrcp`
-fi
-
-if [ "$1" == "-cp" ] ; then
- shift
- CP="${1}:${CP}"
- shift
-fi
-
-java -cp "$CP" scala.tools.nsc.util.ShowPickled $*
diff --git a/tools/starr_scala b/tools/starr_scala
deleted file mode 100755
index 9b0fb60cf7..0000000000
--- a/tools/starr_scala
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-#
-
-CP=$($(dirname $BASH_SOURCE)/starrcp)
-
-java $JAVA_OPTS -classpath "$CP" scala.tools.nsc.MainGenericRunner -usejavacp "$@"
diff --git a/tools/starr_scalac b/tools/starr_scalac
deleted file mode 100755
index 972eeaff2b..0000000000
--- a/tools/starr_scalac
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-#
-
-CP=$($(dirname $BASH_SOURCE)/starrcp)
-
-java $JAVA_OPTS -classpath "$CP" scala.tools.nsc.Main -usejavacp "$@"
diff --git a/tools/starrcp b/tools/starrcp
deleted file mode 100755
index 76f40fde03..0000000000
--- a/tools/starrcp
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-#
-
-dir=$(dirname $0)
-$dir/cpof $dir/../lib
diff --git a/tools/strapcp b/tools/strapcp
deleted file mode 100755
index 6a4044ae24..0000000000
--- a/tools/strapcp
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-#
-
-dir=$(dirname $0)
-strap="$dir/../build/strap/classes"
-[[ -d $strap ]] || { echo "Error: no directory at $strap"; exit 1; }
-
-cp=$($dir/cpof $strap)
-asm=$($dir/abspath $dir/../build/asm/classes)
-
-echo $cp:$asm
diff --git a/tools/test-renamer b/tools/test-renamer
deleted file mode 100755
index 5a7fc3d78c..0000000000
--- a/tools/test-renamer
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/usr/bin/env bash
-#
-# Despite its shameful hackiness, checked in for posterity.
-# It'll live on forever in the git history; then I can remove it.
-
-# set -e
-shopt -s nullglob
-
-cd $(dirname $0)/../test
-
-rename_pattern='^.*/bug[0-9]+.*?(\.scala)?$'
-
-targets ()
-{
- ls -d pending/*/* disabled/*/* | egrep "$rename_pattern"
-}
-
-showRun ()
-{
- echo "$@"
- "$@"
-}
-
-for path in $(targets); do
- if [[ -f "$path" ]]; then
- # echo "$path"
- dir=$(dirname "$path")
- file=$(basename "$path")
- base=${file%%.scala}
- num=${base##bug}
-
- (cd "$dir" &&
- for file in ${base}.*; do
- ext=${file##*.}
- newname="t${num}.${ext}"
-
- if [[ -e "$newname" ]]; then
- echo "Hey, $newname already exists."
- else
- showRun perl -pi -e "'s/bug$num\b/t$num/g;'" "$file"
- showRun mv "$file" "$newname"
- fi
- done
- )
- fi
-
- if [[ -d "$path" ]]; then
- dir=$(dirname "$path")
- file=$(basename "$path")
- base="$file"
- num=${base##bug}
-
- (cd "$dir" &&
- for file in $file ${file}.*; do
- ext=${file##*.}
- if [[ "$ext" != "$file" ]]; then
- newname="t${num}.${ext}"
- else
- newname="t${num}"
- for file0 in ${file}/*; do
- showRun perl -pi -e "'s/bug$num\b/t$num/g;'" "$file0"
- done
- fi
-
- if [[ -e "$newname" ]]; then
- echo "Hey, $newname already exists."
- else
- if [[ -f "$file" ]]; then
- showRun perl -pi -e "'s/bug$num\b/t$num/g;'" "$file"
- fi
- showRun mv "$file" "$newname"
- fi
- done
- )
-
- fi
-
-done
-#
-# for d in files/*/*; do
-# [[ -d "$d" ]] && do_dir "$d"
-# done
diff --git a/tools/updatescalacheck b/tools/updatescalacheck
deleted file mode 100755
index c4b80dd963..0000000000
--- a/tools/updatescalacheck
+++ /dev/null
@@ -1,130 +0,0 @@
-#
-#
-# ScalaCheck update script.
-#
-#
-
-
-# vars
-TMPFILE=`mktemp`
-SCALACHECK_REL_DIR=src/scalacheck
-DESC="Updates ScalaCheck sources from ScalaCheck nightly branch."
-WARN="Make sure your repository checkout is clean. Will remove and delete existing ScalaCheck source in <path-to-scala-repo>/$SCALACHECK_REL_DIR!"
-USAGE=" Usage: updatescalacheck <path-to-scala-repo>"
-
-
-# functions
-function error() {
- rm $TMPFILE
- exit 1
-}
-
-function success() {
- rm $TMPFILE
- exit 0
-}
-
-
-
-# check num args
-if [ $# -ne 1 ]
-then
- echo $DESC
- echo $WARN
- echo "Must provide path to scala repo checkout dir."
- echo $USAGE
- error
-fi
-
-if [[ $1 = "--help" ]]
-then
- echo $DESC
- echo $WARN
- echo $USAGE
- error
-fi
-
-if [ ! -d $1 ]
-then
- echo "The folder $1 does not exist."
- error
-fi
-
-# go to scala dir
-SCALA_DIR=$1
-cd $SCALA_DIR
-
-#
-# check if checkout is svn and up to date
-# otherwise check if its git and up to date
-#
-if [ -d .svn ] || [ -d _svn ]
-then
- #
- # svn repo - check if clean
- #
- svn status > $TMPFILE
- if [ $? -ne 0 ]
- then
- echo "Detected .svn dir, but svn status returns an error. Check if this is really an .svn repo."
- error
- fi
- echo "svn status output: "
- cat $TMPFILE
- echo "grep found: "
- cat $TMPFILE | grep "^\(?\|A\|D\|M\|C\|!\|~\)"
- GREPRETCODE=$?
- echo "grep return code: $GREPRETCODE"
- if [ $GREPRETCODE -eq 0 ]
- then
- echo "Working directory does not seem to be clean. Do a clean checkout and try again."
- error
- fi
- echo "Checkout appears to be clean."
-elif [ -d .git ]
-then
- #
- # git repo - check if clean
- #
- git status --porcelain > $TMPFILE
- if [ $? -ne 0 ]
- then
- echo "Detected .git dir, but git status returns an error. Check if this is really a .git repo."
- error
- fi
- echo "git status output: "
- cat $TMPFILE
- echo "grep found: "
- cat $TMPFILE | grep "^\(A\|M\|D\|R\|C\|U\)"
- GREPRETCODE=$?
- echo "grep return code: $GREPRETCODE"
- if [ $GREPRETCODE -eq 0 ]
- then
- echo "Working directory does not seem to be clean. Do a clean checkout and try again."
- error
- fi
- echo "Checkout appears to be clean."
-else
- # no repo detected
- echo "The directory $SCALA_DIR does not seem to be a repository."
- error
-fi
-
-# check if ScalaCheck source dir exists
-if [ ! -d $SCALACHECK_REL_DIR ]
-then
- echo "ScalaCheck source dir does not seem to exist in: $SCALA_DIR/$SCALACHECK_REL_DIR"
- echo "Please create one and try again."
- error
-fi
-
-# go to ScalaCheck source dir
-cd $SCALACHECK_DIR
-
-# update sources
-svn export --force https://scalacheck.googlecode.com/svn/branches/scalanightly/src/main/scala .
-
-# remove unneeded class
-rm org/scalacheck/ScalaCheckFramework.scala
-
-success