Fix 'Use $(...) notation instead of legacy backticked ...
.' issue in shell script
This commit is contained in:
parent
51ec0a92f7
commit
6fe70b58ce
10 changed files with 28 additions and 28 deletions
|
@ -7,7 +7,7 @@ export LC_ALL=C
|
||||||
set -e
|
set -e
|
||||||
srcdir="$(dirname $0)"
|
srcdir="$(dirname $0)"
|
||||||
cd "$srcdir"
|
cd "$srcdir"
|
||||||
if [ -z ${LIBTOOLIZE} ] && GLIBTOOLIZE="`which glibtoolize 2>/dev/null`"; then
|
if [ -z ${LIBTOOLIZE} ] && GLIBTOOLIZE="$(which glibtoolize 2>/dev/null)"; then
|
||||||
LIBTOOLIZE="${GLIBTOOLIZE}"
|
LIBTOOLIZE="${GLIBTOOLIZE}"
|
||||||
export LIBTOOLIZE
|
export LIBTOOLIZE
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -36,13 +36,13 @@ if [ -z "${CODESIGN_ALLOCATE}" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
find ${TEMPDIR} -name "*.sign" | while read i; do
|
find ${TEMPDIR} -name "*.sign" | while read i; do
|
||||||
SIZE=`stat -c %s "${i}"`
|
SIZE=$(stat -c %s "${i}")
|
||||||
TARGET_FILE="`echo "${i}" | sed 's/\.sign$//'`"
|
TARGET_FILE="$(echo "${i}" | sed 's/\.sign$//')"
|
||||||
|
|
||||||
echo "Allocating space for the signature of size ${SIZE} in ${TARGET_FILE}"
|
echo "Allocating space for the signature of size ${SIZE} in ${TARGET_FILE}"
|
||||||
${CODESIGN_ALLOCATE} -i "${TARGET_FILE}" -a ${ARCH} ${SIZE} -o "${i}.tmp"
|
${CODESIGN_ALLOCATE} -i "${TARGET_FILE}" -a ${ARCH} ${SIZE} -o "${i}.tmp"
|
||||||
|
|
||||||
OFFSET=`${PAGESTUFF} "${i}.tmp" -p | tail -2 | grep offset | sed 's/[^0-9]*//g'`
|
OFFSET=$(${PAGESTUFF} "${i}.tmp" -p | tail -2 | grep offset | sed 's/[^0-9]*//g')
|
||||||
if [ -z ${QUIET} ]; then
|
if [ -z ${QUIET} ]; then
|
||||||
echo "Attaching signature at offset ${OFFSET}"
|
echo "Attaching signature at offset ${OFFSET}"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -27,19 +27,19 @@ ${CODESIGN} -f --file-list ${TEMPLIST} "$@" "${BUNDLE}"
|
||||||
|
|
||||||
grep -v CodeResources < "${TEMPLIST}" | while read i; do
|
grep -v CodeResources < "${TEMPLIST}" | while read i; do
|
||||||
TARGETFILE="${BUNDLE}/`echo "${i}" | sed "s|.*${BUNDLE}/||"`"
|
TARGETFILE="${BUNDLE}/`echo "${i}" | sed "s|.*${BUNDLE}/||"`"
|
||||||
SIZE=`pagestuff "$i" -p | tail -2 | grep size | sed 's/[^0-9]*//g'`
|
SIZE=$(pagestuff "$i" -p | tail -2 | grep size | sed 's/[^0-9]*//g')
|
||||||
OFFSET=`pagestuff "$i" -p | tail -2 | grep offset | sed 's/[^0-9]*//g'`
|
OFFSET=$(pagestuff "$i" -p | tail -2 | grep offset | sed 's/[^0-9]*//g')
|
||||||
SIGNFILE="${TEMPDIR}/${OUTROOT}/${TARGETFILE}.sign"
|
SIGNFILE="${TEMPDIR}/${OUTROOT}/${TARGETFILE}.sign"
|
||||||
DIRNAME="`dirname "${SIGNFILE}"`"
|
DIRNAME="$(dirname "${SIGNFILE}")"
|
||||||
mkdir -p "${DIRNAME}"
|
mkdir -p "${DIRNAME}"
|
||||||
echo "Adding detached signature for: ${TARGETFILE}. Size: ${SIZE}. Offset: ${OFFSET}"
|
echo "Adding detached signature for: ${TARGETFILE}. Size: ${SIZE}. Offset: ${OFFSET}"
|
||||||
dd if="$i" of="${SIGNFILE}" bs=1 skip=${OFFSET} count=${SIZE} 2>/dev/null
|
dd if="$i" of="${SIGNFILE}" bs=1 skip=${OFFSET} count=${SIZE} 2>/dev/null
|
||||||
done
|
done
|
||||||
|
|
||||||
grep CodeResources < "${TEMPLIST}" | while read i; do
|
grep CodeResources < "${TEMPLIST}" | while read i; do
|
||||||
TARGETFILE="${BUNDLE}/`echo "${i}" | sed "s|.*${BUNDLE}/||"`"
|
TARGETFILE="${BUNDLE}/$(echo "${i}" | sed "s|.*${BUNDLE}/||")"
|
||||||
RESOURCE="${TEMPDIR}/${OUTROOT}/${TARGETFILE}"
|
RESOURCE="${TEMPDIR}/${OUTROOT}/${TARGETFILE}"
|
||||||
DIRNAME="`dirname "${RESOURCE}"`"
|
DIRNAME="$(dirname "${RESOURCE}")"
|
||||||
mkdir -p "${DIRNAME}"
|
mkdir -p "${DIRNAME}"
|
||||||
echo "Adding resource for: \"${TARGETFILE}\""
|
echo "Adding resource for: \"${TARGETFILE}\""
|
||||||
cp "${i}" "${RESOURCE}"
|
cp "${i}" "${RESOURCE}"
|
||||||
|
|
|
@ -23,7 +23,7 @@ TIMESERVER=http://timestamp.comodoca.com
|
||||||
CERTFILE="win-codesign.cert"
|
CERTFILE="win-codesign.cert"
|
||||||
|
|
||||||
mkdir -p "${OUTSUBDIR}"
|
mkdir -p "${OUTSUBDIR}"
|
||||||
basename -a `ls -1 "${SRCDIR}"/*-unsigned.exe` | while read UNSIGNED; do
|
basename -a $(ls -1 "${SRCDIR}"/*-unsigned.exe) | while read UNSIGNED; do
|
||||||
echo Signing "${UNSIGNED}"
|
echo Signing "${UNSIGNED}"
|
||||||
"${OSSLSIGNCODE}" sign -certs "${CERTFILE}" -t "${TIMESERVER}" -in "${SRCDIR}/${UNSIGNED}" -out "${WORKDIR}/${UNSIGNED}" "$@"
|
"${OSSLSIGNCODE}" sign -certs "${CERTFILE}" -t "${TIMESERVER}" -in "${SRCDIR}/${UNSIGNED}" -out "${WORKDIR}/${UNSIGNED}" "$@"
|
||||||
"${OSSLSIGNCODE}" extract-signature -pem -in "${WORKDIR}/${UNSIGNED}" -out "${OUTSUBDIR}/${UNSIGNED}.pem" && rm "${WORKDIR}/${UNSIGNED}"
|
"${OSSLSIGNCODE}" extract-signature -pem -in "${WORKDIR}/${UNSIGNED}" -out "${OUTSUBDIR}/${UNSIGNED}.pem" && rm "${WORKDIR}/${UNSIGNED}"
|
||||||
|
|
|
@ -30,13 +30,13 @@ if which ccache >/dev/null; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pushd depends
|
pushd depends
|
||||||
make -j`getconf _NPROCESSORS_ONLN` HOST=x86_64-apple-darwin14 NO_QT=1 V=1
|
make -j$(getconf _NPROCESSORS_ONLN) HOST=x86_64-apple-darwin14 NO_QT=1 V=1
|
||||||
popd
|
popd
|
||||||
|
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
DEPS_DIR=`pwd`/depends/x86_64-apple-darwin14
|
DEPS_DIR=$(pwd)/depends/x86_64-apple-darwin14
|
||||||
CONFIG_SITE=${DEPS_DIR}/share/config.site ./configure --enable-reduce-exports --without-gui --with-icu="${DEPS_DIR}" --enable-static --disable-shared
|
CONFIG_SITE=${DEPS_DIR}/share/config.site ./configure --enable-reduce-exports --without-gui --with-icu="${DEPS_DIR}" --enable-static --disable-shared
|
||||||
make -j`getconf _NPROCESSORS_ONLN`
|
make -j$(getconf _NPROCESSORS_ONLN)
|
||||||
${DEPS_DIR}/native/bin/x86_64-apple-darwin14-strip src/lbrycrdd src/lbrycrd-cli src/lbrycrd-tx
|
${DEPS_DIR}/native/bin/x86_64-apple-darwin14-strip src/lbrycrdd src/lbrycrd-cli src/lbrycrd-tx
|
||||||
|
|
||||||
if which ccache >/dev/null; then
|
if which ccache >/dev/null; then
|
||||||
|
|
|
@ -20,13 +20,13 @@ export CXXFLAGS="${CXXFLAGS:--frecord-gcc-switches}"
|
||||||
echo "CXXFLAGS set to $CXXFLAGS"
|
echo "CXXFLAGS set to $CXXFLAGS"
|
||||||
|
|
||||||
cd depends
|
cd depends
|
||||||
make -j`getconf _NPROCESSORS_ONLN` HOST=x86_64-pc-linux-gnu NO_QT=1 V=1
|
make -j$(getconf _NPROCESSORS_ONLN) HOST=x86_64-pc-linux-gnu NO_QT=1 V=1
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
DEPS_DIR=`pwd`/depends/x86_64-pc-linux-gnu
|
DEPS_DIR=$(pwd)/depends/x86_64-pc-linux-gnu
|
||||||
CONFIG_SITE=${DEPS_DIR}/share/config.site ./configure --enable-static --disable-shared --with-pic --without-gui
|
CONFIG_SITE=${DEPS_DIR}/share/config.site ./configure --enable-static --disable-shared --with-pic --without-gui
|
||||||
make -j`getconf _NPROCESSORS_ONLN`
|
make -j$(getconf _NPROCESSORS_ONLN)
|
||||||
strip src/lbrycrdd src/lbrycrd-cli src/lbrycrd-tx
|
strip src/lbrycrdd src/lbrycrd-cli src/lbrycrd-tx
|
||||||
|
|
||||||
if which ccache >/dev/null; then
|
if which ccache >/dev/null; then
|
||||||
|
@ -34,4 +34,4 @@ if which ccache >/dev/null; then
|
||||||
ccache -s
|
ccache -s
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Linux 64bit build is complete"
|
echo "Linux 64bit build is complete"
|
||||||
|
|
|
@ -21,13 +21,13 @@ if which ccache >/dev/null; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pushd depends
|
pushd depends
|
||||||
make -j`getconf _NPROCESSORS_ONLN` HOST=i686-w64-mingw32 NO_QT=1 V=1
|
make -j$(getconf _NPROCESSORS_ONLN) HOST=i686-w64-mingw32 NO_QT=1 V=1
|
||||||
popd
|
popd
|
||||||
|
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
DEPS_DIR=`pwd`/depends/i686-w64-mingw32
|
DEPS_DIR=$(pwd)/depends/i686-w64-mingw32
|
||||||
CONFIG_SITE=${DEPS_DIR}/share/config.site ./configure --prefix=/ --without-gui --with-icu="$DEPS_DIR" --enable-static --disable-shared
|
CONFIG_SITE=${DEPS_DIR}/share/config.site ./configure --prefix=/ --without-gui --with-icu="$DEPS_DIR" --enable-static --disable-shared
|
||||||
make -j`getconf _NPROCESSORS_ONLN`
|
make -j$(getconf _NPROCESSORS_ONLN)
|
||||||
i686-w64-mingw32-strip src/lbrycrdd.exe src/lbrycrd-cli.exe src/lbrycrd-tx.exe
|
i686-w64-mingw32-strip src/lbrycrdd.exe src/lbrycrd-cli.exe src/lbrycrd-tx.exe
|
||||||
|
|
||||||
if which ccache >/dev/null; then
|
if which ccache >/dev/null; then
|
||||||
|
|
|
@ -20,13 +20,13 @@ if which ccache >/dev/null; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pushd depends
|
pushd depends
|
||||||
make -j`getconf _NPROCESSORS_ONLN` HOST=x86_64-w64-mingw32 NO_QT=1 V=1
|
make -j$(getconf _NPROCESSORS_ONLN) HOST=x86_64-w64-mingw32 NO_QT=1 V=1
|
||||||
popd
|
popd
|
||||||
|
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
DEPS_DIR=`pwd`/depends/x86_64-w64-mingw32
|
DEPS_DIR=$(pwd)/depends/x86_64-w64-mingw32
|
||||||
CONFIG_SITE=${DEPS_DIR}/share/config.site ./configure --prefix=/ --without-gui --with-icu="$DEPS_DIR" --enable-static --disable-shared
|
CONFIG_SITE=${DEPS_DIR}/share/config.site ./configure --prefix=/ --without-gui --with-icu="$DEPS_DIR" --enable-static --disable-shared
|
||||||
make -j`getconf _NPROCESSORS_ONLN`
|
make -j$(getconf _NPROCESSORS_ONLN)
|
||||||
x86_64-w64-mingw32-strip src/lbrycrdd.exe src/lbrycrd-cli.exe src/lbrycrd-tx.exe
|
x86_64-w64-mingw32-strip src/lbrycrdd.exe src/lbrycrd-cli.exe src/lbrycrd-tx.exe
|
||||||
|
|
||||||
if which ccache >/dev/null; then
|
if which ccache >/dev/null; then
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
set -e
|
set -e
|
||||||
srcdir="$(dirname $0)"
|
srcdir="$(dirname $0)"
|
||||||
cd "$srcdir"
|
cd "$srcdir"
|
||||||
if [ -z ${LIBTOOLIZE} ] && GLIBTOOLIZE="`which glibtoolize 2>/dev/null`"; then
|
if [ -z ${LIBTOOLIZE} ] && GLIBTOOLIZE="$(which glibtoolize 2>/dev/null)"; then
|
||||||
LIBTOOLIZE="${GLIBTOOLIZE}"
|
LIBTOOLIZE="${GLIBTOOLIZE}"
|
||||||
export LIBTOOLIZE
|
export LIBTOOLIZE
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -18,12 +18,12 @@ if test "x$1" = "x"; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RET=0
|
RET=0
|
||||||
PREV_BRANCH=`git name-rev --name-only HEAD`
|
PREV_BRANCH=$(git name-rev --name-only HEAD)
|
||||||
PREV_HEAD=`git rev-parse HEAD`
|
PREV_HEAD=$(git rev-parse HEAD)
|
||||||
for i in `git rev-list --reverse $1`; do
|
for i in $(git rev-list --reverse $1); do
|
||||||
if git rev-list -n 1 --pretty="%s" $i | grep -q "^scripted-diff:"; then
|
if git rev-list -n 1 --pretty="%s" $i | grep -q "^scripted-diff:"; then
|
||||||
git checkout --quiet $i^ || exit
|
git checkout --quiet $i^ || exit
|
||||||
SCRIPT="`git rev-list --format=%b -n1 $i | sed '/^-BEGIN VERIFY SCRIPT-$/,/^-END VERIFY SCRIPT-$/{//!b};d'`"
|
SCRIPT="$(git rev-list --format=%b -n1 $i | sed '/^-BEGIN VERIFY SCRIPT-$/,/^-END VERIFY SCRIPT-$/{//!b};d')"
|
||||||
if test "x$SCRIPT" = "x"; then
|
if test "x$SCRIPT" = "x"; then
|
||||||
echo "Error: missing script for: $i"
|
echo "Error: missing script for: $i"
|
||||||
echo "Failed"
|
echo "Failed"
|
||||||
|
|
Loading…
Reference in a new issue