mirror of
https://github.com/aria2/aria2.git
synced 2024-11-26 19:43:42 +08:00
Fix shellcheck warnings
This commit is contained in:
parent
bbef0f0492
commit
aea080969c
@ -32,7 +32,7 @@
|
||||
# files in the program, then also delete it here.
|
||||
|
||||
# cd to the directory where this script exists.
|
||||
cd $(dirname $0)
|
||||
cd "$(dirname $0)"
|
||||
. ./script-helper
|
||||
|
||||
get_version
|
||||
@ -43,8 +43,8 @@ if [ -z "$VERSION" ]; then
|
||||
fi
|
||||
|
||||
DIST_DIR=aria2-$VERSION-aarch64-linux-android-build1
|
||||
mkdir $DIST_DIR
|
||||
mkdir "$DIST_DIR"
|
||||
cp AUTHORS COPYING ChangeLog LICENSE.OpenSSL NEWS README.html README.android \
|
||||
android-out/aria2c $DIST_DIR
|
||||
zip -9 -r $DIST_DIR.zip $DIST_DIR
|
||||
rm -rf $DIST_DIR
|
||||
android-out/aria2c "$DIST_DIR"
|
||||
zip -9 -r "$DIST_DIR.zip" "$DIST_DIR"
|
||||
rm -rf "$DIST_DIR"
|
||||
|
@ -6,27 +6,27 @@ BUILDDIR=/tmp/aria2buildtest
|
||||
|
||||
if [ ! -d "$BUILDDIR" ]; then
|
||||
mkdir "$BUILDDIR" \
|
||||
|| { echo "Failed to create directory $BUILDDIR" && exit -1; }
|
||||
|| { echo "Failed to create directory $BUILDDIR" && exit 1; }
|
||||
fi
|
||||
|
||||
echo -n "Starting build test "
|
||||
echo `date`
|
||||
echo "$(date)"
|
||||
|
||||
# build CONFIGURE_OPTS BIN_SUFFIX DESC
|
||||
build()
|
||||
{
|
||||
echo -n "new build() started at "
|
||||
echo `date`
|
||||
echo "$(date)"
|
||||
echo "*** configure opts=$1"
|
||||
BIN_NAME="aria2c_$2"
|
||||
if [ -f "$BUILDDIR/$BIN_NAME" ]; then
|
||||
echo "$BIN_NAME exists, skipping"
|
||||
return
|
||||
fi
|
||||
./configure $1 2>&1 | tee "$BUILDDIR/configure_$2.log"\
|
||||
./configure $1 2>&1 | tee "$BUILDDIR/configure_$2.log" \
|
||||
&& cp config.log "$BUILDDIR/config.log_$2" \
|
||||
&& LANG=C make clean \
|
||||
&& LANG=C make -j2 check 2>&1 |tee "$BUILDDIR/aria2c_$2.log" \
|
||||
&& LANG=C make -j2 check 2>&1 | tee "$BUILDDIR/aria2c_$2.log" \
|
||||
&& cp src/aria2c "$BUILDDIR/aria2c_$2"
|
||||
|
||||
if [ -f "test/aria2c.log" ]; then
|
||||
@ -36,8 +36,8 @@ build()
|
||||
|
||||
clear()
|
||||
{
|
||||
for file in `ls $BUILDDIR`; do
|
||||
rm -f "$BUILDDIR/$file";
|
||||
for file in $(ls "$BUILDDIR"); do
|
||||
rm -f "$BUILDDIR/$file"
|
||||
done
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ echo -n "en@quot en@boldquot" > "$PO_DIR"/LINGUAS
|
||||
for file in "$WORK_DIR"/*.po; do
|
||||
# First remove useless '\r' in messages
|
||||
sed -i -e 's/\\r//' "$file"
|
||||
bn=`basename "$file"`
|
||||
bn=$(basename "$file")
|
||||
bn=${bn#aria2-}
|
||||
dst="$PO_DIR"/"$bn"
|
||||
# copy file to po directory
|
||||
|
@ -36,7 +36,7 @@ test -z "$BUILD_VER" && BUILD_VER=1
|
||||
test -z "$LABEL" && LABEL=$HOST
|
||||
|
||||
# cd to the directory where this script exists.
|
||||
cd $(dirname $0)
|
||||
cd "$(dirname "$0")"
|
||||
. ./script-helper
|
||||
|
||||
get_version
|
||||
@ -48,8 +48,8 @@ fi
|
||||
|
||||
DIST_DIR=aria2-${VERSION}-${LABEL}-build${BUILD_VER}
|
||||
|
||||
mkdir $DIST_DIR
|
||||
mkdir "$DIST_DIR"
|
||||
cp AUTHORS COPYING ChangeLog LICENSE.OpenSSL NEWS README.html README.mingw \
|
||||
mingw-out/aria2c.exe $DIST_DIR
|
||||
zip -9 -r $DIST_DIR.zip $DIST_DIR
|
||||
rm -rf $DIST_DIR
|
||||
mingw-out/aria2c.exe "$DIST_DIR"
|
||||
zip -9 -r "$DIST_DIR.zip" "$DIST_DIR"
|
||||
rm -rf "$DIST_DIR"
|
||||
|
@ -29,7 +29,7 @@
|
||||
# version. If you delete this exception statement from all source
|
||||
# files in the program, then also delete it here.
|
||||
|
||||
get_version () {
|
||||
VERSION=`grep AC_INIT configure.ac | sed '/AC_INIT/ s/AC_INIT(\[aria2\],\[\([^]]\+\)\],.*/\1/'`
|
||||
get_version() {
|
||||
VERSION=$(grep AC_INIT configure.ac | sed '/AC_INIT/ s/AC_INIT(\[aria2\],\[\([^]]\+\)\],.*/\1/')
|
||||
echo "Version: $VERSION"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user