Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit a4fccbb

Browse files
committed
Run shell scripts through shellcheck
1 parent ce8822c commit a4fccbb

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

script/cibuild.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@ then
77
fi
88

99
# Create a test repo which we can use for the online::push tests
10-
mkdir $HOME/_temp
11-
git init --bare $HOME/_temp/test.git
12-
git daemon --listen=localhost --export-all --enable=receive-pack --base-path=$HOME/_temp $HOME/_temp 2>/dev/null &
10+
mkdir "$HOME"/_temp
11+
git init --bare "$HOME"/_temp/test.git
12+
git daemon --listen=localhost --export-all --enable=receive-pack --base-path="$HOME"/_temp "$HOME"/_temp 2>/dev/null &
1313
export GITTEST_REMOTE_URL="git://localhost/test.git"
1414

1515
mkdir _build
1616
cd _build
17+
# shellcheck disable=SC2086
1718
cmake .. -DCMAKE_INSTALL_PREFIX=../_install $OPTIONS || exit $?
1819
make -j2 install || exit $?
1920
ctest -V . || exit $?

script/coverity.sh

+11-11
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,24 @@ then
1313
fi
1414

1515
COV_VERSION=6.6.1
16-
case `uname -m` in
16+
case $(uname -m) in
1717
i?86) BITS=32 ;;
1818
amd64|x86_64) BITS=64 ;;
1919
esac
2020
SCAN_TOOL=https://scan.coverity.com/download/linux-${BITS}
21-
TOOL_BASE=`pwd`/_coverity-scan
21+
TOOL_BASE=$(pwd)/_coverity-scan
2222

2323
# Install coverity tools
24-
if [ ! -d $TOOL_BASE ]; then
24+
if [ ! -d "$TOOL_BASE" ]; then
2525
echo "Downloading coverity..."
26-
mkdir -p $TOOL_BASE
27-
cd $TOOL_BASE
26+
mkdir -p "$TOOL_BASE"
27+
pushd "$TOOL_BASE"
2828
wget -O coverity_tool.tgz $SCAN_TOOL \
2929
--post-data "project=libgit2&token=$COVERITY_TOKEN"
3030
tar xzf coverity_tool.tgz
31-
cd ..
32-
TOOL_DIR=`find $TOOL_BASE -type d -name 'cov-analysis*'`
33-
ln -s $TOOL_DIR $TOOL_BASE/cov-analysis
31+
popd
32+
TOOL_DIR=$(find "$TOOL_BASE" -type d -name 'cov-analysis*')
33+
ln -s "$TOOL_DIR" "$TOOL_BASE"/cov-analysis
3434
fi
3535

3636
COV_BUILD="$TOOL_BASE/cov-analysis/bin/cov-build"
@@ -46,12 +46,12 @@ COVERITY_UNSUPPORTED=1 \
4646

4747
# Upload results
4848
tar czf libgit2.tgz cov-int
49-
SHA=`git rev-parse --short HEAD`
49+
SHA=$(git rev-parse --short HEAD)
5050
curl \
5151
--form project=libgit2 \
52-
--form token=$COVERITY_TOKEN \
52+
--form token="$COVERITY_TOKEN" \
5353
5454
55-
--form version=$SHA \
55+
--form version="$SHA" \
5656
--form description="Travis build" \
5757
http://scan5.coverity.com/cgi-bin/upload.py

0 commit comments

Comments
 (0)