Skip to content

Commit

Permalink
Fix shellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
cortinico committed Aug 10, 2022
1 parent 40f057a commit 3ceeadb
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions scripts/circleci/buckToJunit/buckToJunit.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
#!/bin/bash
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

# Get script directory
prog="$0"
while [ -h "${prog}" ]; do
newProg=`/bin/ls -ld "${prog}"`
newProg=`expr "${newProg}" : ".* -> \(.*\)$"`
newProg=$(/bin/ls -ld "${prog}")
newProg=$(expr "${newProg}" : ".* -> \(.*\)$")
if expr "x${newProg}" : 'x/' >/dev/null; then
prog="${newProg}"
else
progdir=`dirname "${prog}"`
progdir=$(dirname "${prog}")
prog="${progdir}/${newProg}"
fi
done
DIR=`dirname $prog`
DIR=$(dirname "${prog}")

# We download saxon from Maven Central rather than copying it over.
curl https://repo1.maven.org/maven2/net/sf/saxon/Saxon-HE/9.7.0-11/Saxon-HE-9.7.0-11.jar --output $DIR/saxon.jar

saxonJar="$DIR/saxon.jar"
buckToJunitXsl="$DIR/buckToJunit.xsl"
curl https://repo1.maven.org/maven2/net/sf/saxon/Saxon-HE/9.7.0-11/Saxon-HE-9.7.0-11.jar --output "$DIR/saxon.jar"

# Perform conversion
java -jar $saxonJar -xsl:$buckToJunitXsl -s:$1 -o:$2
java -jar "$DIR/saxon.jar" -xsl:"$DIR/buckToJunit.xsl" -s:"$1" -o:"$2"

0 comments on commit 3ceeadb

Please sign in to comment.