cd ../../..
if test $exitval -eq 0; then
cat >config.reconfig <<EOF
-#!/bin/sh -ex
+[#!/bin/bash
# Generated by configure, `date`
# This script part of CVC4.
-target='$target'
-build_type='$build_type'
+cd "\`dirname \\"\$0\\"\`"
-cd "builds/$target/$build_type"
-./config.status "\$@"
+current=(\`grep '^CURRENT_BUILD' builds/current | sed 's,^CURRENT_BUILD *= *\([^/]\\+\\)/\\(.*\\),\\1 \\2,'\`)
+arch=\${current[0]}
+build=\${current[1]}
+
+echo "reconfiguring in builds/\$arch/\$build..."
+cd "builds/\$arch/\$build"
+echo ./config.status "\$@"
+./config.status "\$@"]
EOF
chmod +x config.reconfig
fi