summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xandroid-release10
-rwxr-xr-xbuild_test.sh14
-rwxr-xr-ximport-po2
-rwxr-xr-xmingw-release10
-rw-r--r--script-helper4
5 files changed, 20 insertions, 20 deletions
diff --git a/android-release b/android-release
index cbc46bfb..9ea99e9a 100755
--- a/android-release
+++ b/android-release
@@ -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"
diff --git a/build_test.sh b/build_test.sh
index e0c090da..63fded82 100755
--- a/build_test.sh
+++ b/build_test.sh
@@ -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
}
diff --git a/import-po b/import-po
index dea98de2..cca7b57e 100755
--- a/import-po
+++ b/import-po
@@ -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
diff --git a/mingw-release b/mingw-release
index 61a07899..722a7fe5 100755
--- a/mingw-release
+++ b/mingw-release
@@ -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"
diff --git a/script-helper b/script-helper
index 30460b66..4f8e9c30 100644
--- a/script-helper
+++ b/script-helper
@@ -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"
}