mirror of
https://git.proxmox.com/git/libgit2
synced 2025-08-07 11:10:40 +00:00
Merge pull request #2710 from Therzok/shellcheckScripts
Run shell scripts through shellcheck
This commit is contained in:
commit
6f4461763e
@ -7,13 +7,14 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Create a test repo which we can use for the online::push tests
|
# Create a test repo which we can use for the online::push tests
|
||||||
mkdir $HOME/_temp
|
mkdir "$HOME"/_temp
|
||||||
git init --bare $HOME/_temp/test.git
|
git init --bare "$HOME"/_temp/test.git
|
||||||
git daemon --listen=localhost --export-all --enable=receive-pack --base-path=$HOME/_temp $HOME/_temp 2>/dev/null &
|
git daemon --listen=localhost --export-all --enable=receive-pack --base-path="$HOME"/_temp "$HOME"/_temp 2>/dev/null &
|
||||||
export GITTEST_REMOTE_URL="git://localhost/test.git"
|
export GITTEST_REMOTE_URL="git://localhost/test.git"
|
||||||
|
|
||||||
mkdir _build
|
mkdir _build
|
||||||
cd _build
|
cd _build
|
||||||
|
# shellcheck disable=SC2086
|
||||||
cmake .. -DCMAKE_INSTALL_PREFIX=../_install $OPTIONS || exit $?
|
cmake .. -DCMAKE_INSTALL_PREFIX=../_install $OPTIONS || exit $?
|
||||||
make -j2 install || exit $?
|
make -j2 install || exit $?
|
||||||
ctest -V . || exit $?
|
ctest -V . || exit $?
|
||||||
|
@ -13,24 +13,24 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
COV_VERSION=6.6.1
|
COV_VERSION=6.6.1
|
||||||
case `uname -m` in
|
case $(uname -m) in
|
||||||
i?86) BITS=32 ;;
|
i?86) BITS=32 ;;
|
||||||
amd64|x86_64) BITS=64 ;;
|
amd64|x86_64) BITS=64 ;;
|
||||||
esac
|
esac
|
||||||
SCAN_TOOL=https://scan.coverity.com/download/linux-${BITS}
|
SCAN_TOOL=https://scan.coverity.com/download/linux-${BITS}
|
||||||
TOOL_BASE=`pwd`/_coverity-scan
|
TOOL_BASE=$(pwd)/_coverity-scan
|
||||||
|
|
||||||
# Install coverity tools
|
# Install coverity tools
|
||||||
if [ ! -d $TOOL_BASE ]; then
|
if [ ! -d "$TOOL_BASE" ]; then
|
||||||
echo "Downloading coverity..."
|
echo "Downloading coverity..."
|
||||||
mkdir -p $TOOL_BASE
|
mkdir -p "$TOOL_BASE"
|
||||||
cd $TOOL_BASE
|
pushd "$TOOL_BASE"
|
||||||
wget -O coverity_tool.tgz $SCAN_TOOL \
|
wget -O coverity_tool.tgz $SCAN_TOOL \
|
||||||
--post-data "project=libgit2&token=$COVERITY_TOKEN"
|
--post-data "project=libgit2&token=$COVERITY_TOKEN"
|
||||||
tar xzf coverity_tool.tgz
|
tar xzf coverity_tool.tgz
|
||||||
cd ..
|
popd
|
||||||
TOOL_DIR=`find $TOOL_BASE -type d -name 'cov-analysis*'`
|
TOOL_DIR=$(find "$TOOL_BASE" -type d -name 'cov-analysis*')
|
||||||
ln -s $TOOL_DIR $TOOL_BASE/cov-analysis
|
ln -s "$TOOL_DIR" "$TOOL_BASE"/cov-analysis
|
||||||
fi
|
fi
|
||||||
|
|
||||||
COV_BUILD="$TOOL_BASE/cov-analysis/bin/cov-build"
|
COV_BUILD="$TOOL_BASE/cov-analysis/bin/cov-build"
|
||||||
@ -46,12 +46,12 @@ COVERITY_UNSUPPORTED=1 \
|
|||||||
|
|
||||||
# Upload results
|
# Upload results
|
||||||
tar czf libgit2.tgz cov-int
|
tar czf libgit2.tgz cov-int
|
||||||
SHA=`git rev-parse --short HEAD`
|
SHA=$(git rev-parse --short HEAD)
|
||||||
curl \
|
curl \
|
||||||
--form project=libgit2 \
|
--form project=libgit2 \
|
||||||
--form token=$COVERITY_TOKEN \
|
--form token="$COVERITY_TOKEN" \
|
||||||
--form email=bs@github.com \
|
--form email=bs@github.com \
|
||||||
--form file=@libgit2.tgz \
|
--form file=@libgit2.tgz \
|
||||||
--form version=$SHA \
|
--form version="$SHA" \
|
||||||
--form description="Travis build" \
|
--form description="Travis build" \
|
||||||
http://scan5.coverity.com/cgi-bin/upload.py
|
http://scan5.coverity.com/cgi-bin/upload.py
|
||||||
|
Loading…
Reference in New Issue
Block a user