summaryrefslogtreecommitdiff
path: root/perf
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2007-12-01 04:19:39 -0500
committerBehdad Esfahbod <behdad@behdad.org>2007-12-01 04:19:39 -0500
commite6166f7b442ae55128b417559e48250c287e49b6 (patch)
tree3ad7fe120df2cc5902bf94af13b5309b59d86d48 /perf
parent0d932f43fe17b2b65d9e52ff8f9c16122b525223 (diff)
Convert bash scripts to regular sh ones for greater portability
Diffstat (limited to 'perf')
-rwxr-xr-xperf/cairo-perf-diff31
1 files changed, 16 insertions, 15 deletions
diff --git a/perf/cairo-perf-diff b/perf/cairo-perf-diff
index 386e3517..3795456f 100755
--- a/perf/cairo-perf-diff
+++ b/perf/cairo-perf-diff
@@ -1,8 +1,8 @@
-#!/bin/bash
+#!/bin/sh
set -e
usage() {
- argv0=$(basename $0)
+ argv0=`basename $0`
cat >&2 << END
Usage:
@@ -61,7 +61,7 @@ done
# Then if anything is left that still looks like an option, (begins
# with a dash), give usage to catch --help or any other -garbage
-if [ $# -eq 0 ] || [ "${1#-}" != "$1" ]; then
+if [ $# -eq 0 ] || [ "`echo "$1" | sed 's/^-//'`" != "$1" ]; then
usage
fi
@@ -90,9 +90,9 @@ fi
git_setup() {
SUBDIRECTORY_OK='Yes'
. git-sh-setup
- CAIRO_DIR=$(dirname $GIT_DIR)
+ CAIRO_DIR=`dirname $GIT_DIR`
if [ "$CAIRO_DIR" = "." ]; then
- CAIRO_DIR=$(pwd)
+ CAIRO_DIR=`pwd`
fi
CAIRO_PERF_DIR=$CAIRO_DIR/.perf
}
@@ -121,8 +121,8 @@ cpu_count() {
# results from a run with an equivalent src tree.
rev2perf() {
rev=$1
- src_tree_sha=$(rev2sha $rev:src)
- perf_tree_sha=$(rev2sha HEAD:perf)
+ src_tree_sha=`rev2sha $rev:src`
+ perf_tree_sha=`rev2sha HEAD:perf`
echo "$CAIRO_PERF_DIR/${perf_tree_sha}-${src_tree_sha}.perf"
}
@@ -135,9 +135,9 @@ run_cairo_perf_if_not_cached() {
rev=$1
build_dir="build-$2"
- owd=$(pwd)
- sha=$(rev2sha $rev)
- perf=$(rev2perf $rev)
+ owd=`pwd`
+ sha=`rev2sha $rev`
+ perf=`rev2perf $rev`
if [ -e $perf ] && [ "$force_cairo_perf" != "true" ]; then
return 0
fi
@@ -147,8 +147,8 @@ run_cairo_perf_if_not_cached() {
fi
cd $CAIRO_DIR
- boilerplate_files=$(git ls-tree --name-only HEAD boilerplate/*)
- perf_files=$(git ls-tree --name-only HEAD perf/*)
+ boilerplate_files=`git ls-tree --name-only HEAD boilerplate/*`
+ perf_files=`git ls-tree --name-only HEAD perf/*`
cd $CAIRO_PERF_DIR
if [ ! -d $build_dir ]; then
@@ -161,7 +161,8 @@ run_cairo_perf_if_not_cached() {
git reset --hard $sha
if [ -z "$MAKEFLAGS" ]; then
- export MAKEFLAGS="-j$(expr $(cpu_count) + 1)"
+ CPU_COUNT=`cpu_count`
+ export MAKEFLAGS="-j`expr $CPU_COUNT + 1`"
fi
if [ ! -e Makefile ]; then
@@ -193,12 +194,12 @@ fi
if [ ! -e $old ]; then
run_cairo_perf_if_not_cached $old old
- old=$(rev2perf $old)
+ old=`rev2perf $old`
fi
if [ ! -e $new ]; then
run_cairo_perf_if_not_cached $new new
- new=$(rev2perf $new)
+ new=`rev2perf $new`
fi
if [ "$html_output" != "true" ]; then