Fix some shellcheck warnings in build-package.sh

This commit is contained in:
Fredrik Fornwall 2017-01-10 02:05:28 -05:00
parent 53a2231fee
commit dd54dd13fd

View File

@ -360,7 +360,7 @@ termux_step_extract_package () {
if [ "x$TERMUX_PKG_FOLDERNAME" = "x" ]; then
folder=`basename $filename .tar.bz2` && folder=`basename $folder .tar.gz` && folder=`basename $folder .tar.xz` && folder=`basename $folder .tar.lz` && folder=`basename $folder .tgz` && folder=`basename $folder .zip`
folder=`echo $folder | sed 's/_/-/'` # dpkg uses _ in tar filename, but - in folder
folder="${folder/_/-}" # dpkg uses _ in tar filename, but - in folder
else
folder=$TERMUX_PKG_FOLDERNAME
fi
@ -648,7 +648,7 @@ termux_step_make () {
termux_step_make_install () {
if ls ./*akefile &> /dev/null; then
: ${TERMUX_PKG_MAKE_INSTALL_TARGET:="install"}:
: "${TERMUX_PKG_MAKE_INSTALL_TARGET:="install"}"
# Some packages have problem with parallell install, and it does not buy much, so use -j 1.
if [ -z "$TERMUX_PKG_EXTRA_MAKE_ARGS" ]; then
make -j 1 ${TERMUX_PKG_MAKE_INSTALL_TARGET}
@ -737,8 +737,8 @@ termux_step_massage () {
if [ -d include ] && [ -z "${TERMUX_PKG_NO_DEVELSPLIT}" ]; then
# Add virtual -dev sub package if there are include files:
local _DEVEL_SUBPACKAGE_FILE=$TERMUX_PKG_TMPDIR/${TERMUX_PKG_NAME}-dev.subpackage.sh
echo TERMUX_SUBPKG_INCLUDE=\"include share/man/man3 lib/pkgconfig share/aclocal $TERMUX_PKG_INCLUDE_IN_DEVPACKAGE\" > $_DEVEL_SUBPACKAGE_FILE
echo TERMUX_SUBPKG_DESCRIPTION=\"Development files for ${TERMUX_PKG_NAME}\" >> $_DEVEL_SUBPACKAGE_FILE
echo TERMUX_SUBPKG_INCLUDE=\"include share/man/man3 lib/pkgconfig share/aclocal $TERMUX_PKG_INCLUDE_IN_DEVPACKAGE\" > "$_DEVEL_SUBPACKAGE_FILE"
echo "TERMUX_SUBPKG_DESCRIPTION=\"Development files for ${TERMUX_PKG_NAME}\"" >> "$_DEVEL_SUBPACKAGE_FILE"
if [ -n "$TERMUX_PKG_DEVPACKAGE_DEPENDS" ]; then
echo TERMUX_SUBPKG_DEPENDS=\"$TERMUX_PKG_NAME,$TERMUX_PKG_DEVPACKAGE_DEPENDS\" >> $_DEVEL_SUBPACKAGE_FILE
else