mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-14 16:46:28 +01:00
Change bash scripts to be POSIX-compatible
some Unix-like operating systems, namely Alpine, don't come with bash preinstalled. scripts in the lib-src/ directory were left untouched. Signed-off-by: Sol Fisher Romanoff <sol@solfisher.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
# Run this script on a directory to "degimpify" all XPM files
|
# Run this script on a directory to "degimpify" all XPM files
|
||||||
# within that directory (meaning any file ending with .XPM)
|
# within that directory (meaning any file ending with .XPM)
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/bin/sh
|
||||||
# The AppImage runtime sets some special environment variables. We provide
|
# The AppImage runtime sets some special environment variables. We provide
|
||||||
# default values here in case the user tries to run this script outside an
|
# default values here in case the user tries to run this script outside an
|
||||||
# AppImage where the variables would otherwise be undefined.
|
# AppImage where the variables would otherwise be undefined.
|
||||||
if [[ ! "${APPIMAGE}" || ! "${APPDIR}" ]]; then
|
if [ ! "${APPIMAGE}" ] || [ ! "${APPDIR}" ]; then
|
||||||
export APPIMAGE="$(readlink -f "${0}")"
|
export APPIMAGE="$(readlink -f "${0}")"
|
||||||
export APPDIR="$(dirname "${APPIMAGE}")"
|
export APPDIR="$(dirname "${APPIMAGE}")"
|
||||||
fi
|
fi
|
||||||
@@ -12,8 +12,7 @@ export LD_LIBRARY_PATH="${APPDIR}/lib:${LD_LIBRARY_PATH}"
|
|||||||
export AUDACITY_PATH="${AUDACITY_PATH}:${APPDIR}/share/tenacity"
|
export AUDACITY_PATH="${AUDACITY_PATH}:${APPDIR}/share/tenacity"
|
||||||
export AUDACITY_MODULES_PATH="${AUDACITY_MODULES_PATH}:${APPDIR}/lib/modules"
|
export AUDACITY_MODULES_PATH="${AUDACITY_MODULES_PATH}:${APPDIR}/lib/modules"
|
||||||
|
|
||||||
function help()
|
help() {
|
||||||
{
|
|
||||||
# Normal tenacity help
|
# Normal tenacity help
|
||||||
"${APPDIR}/bin/tenacity" --help
|
"${APPDIR}/bin/tenacity" --help
|
||||||
# Special options handled by this script
|
# Special options handled by this script
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
export TZ=Europe/London
|
export TZ=Europe/London
|
||||||
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||||
|
|
||||||
apt_packages_basic=(
|
apt_packages_basic="
|
||||||
build-essential
|
build-essential
|
||||||
python3-minimal
|
python3-minimal
|
||||||
python3-pip
|
python3-pip
|
||||||
@@ -9,16 +11,16 @@ apt_packages_basic=(
|
|||||||
libstdc++-9-dev
|
libstdc++-9-dev
|
||||||
cmake
|
cmake
|
||||||
git
|
git
|
||||||
)
|
"
|
||||||
|
|
||||||
apt_packages_minimal_deps=(
|
apt_packages_minimal_deps="
|
||||||
libgtk2.0-dev
|
libgtk2.0-dev
|
||||||
libasound2-dev
|
libasound2-dev
|
||||||
libavformat-dev
|
libavformat-dev
|
||||||
libjack-jackd2-dev
|
libjack-jackd2-dev
|
||||||
)
|
"
|
||||||
|
|
||||||
apt_packages_full_deps=(
|
apt_packages_full_deps="
|
||||||
zlib1g-dev
|
zlib1g-dev
|
||||||
libexpat1-dev
|
libexpat1-dev
|
||||||
libmp3lame-dev
|
libmp3lame-dev
|
||||||
@@ -51,12 +53,12 @@ apt_packages_full_deps=(
|
|||||||
libcurl4-openssl-dev
|
libcurl4-openssl-dev
|
||||||
libpng-dev
|
libpng-dev
|
||||||
libjpeg-turbo8-dev
|
libjpeg-turbo8-dev
|
||||||
)
|
"
|
||||||
|
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
"${apt_packages_basic[@]}" \
|
"$apt_packages_basic" \
|
||||||
"${apt_packages_minimal_deps[@]}" \
|
"$apt_packages_minimal_deps" \
|
||||||
"${apt_packages_full_deps[@]}"
|
"$apt_packages_full_deps"
|
||||||
|
|
||||||
|
|
||||||
pip3 install conan
|
pip3 install conan
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/bin/sh
|
||||||
|
|
||||||
conan --version
|
conan --version
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/bin/sh
|
||||||
|
|
||||||
version="@CPACK_PACKAGE_NAME@ v@CPACK_PACKAGE_VERSION@ @CPACK_AUDACITY_ARCH_LABEL@"
|
version="@CPACK_PACKAGE_NAME@ v@CPACK_PACKAGE_VERSION@ @CPACK_AUDACITY_ARCH_LABEL@"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
# Report how complete each translation catalog is
|
# Report how complete each translation catalog is
|
||||||
|
|
||||||
@@ -8,9 +8,11 @@ total=`grep '^msgid' audacity.pot | wc -l`
|
|||||||
#CSV header
|
#CSV header
|
||||||
echo "Name,Completed,Pct. completed,Bad lines"
|
echo "Name,Completed,Pct. completed,Bad lines"
|
||||||
|
|
||||||
declare -i badlines
|
badlines=0
|
||||||
|
|
||||||
|
for filename in *.po; do
|
||||||
|
[ -e "$filename" ] || break
|
||||||
|
|
||||||
for filename in `ls *.po`; do
|
|
||||||
# If there are errors from msgcmp, then the last line on standard error
|
# If there are errors from msgcmp, then the last line on standard error
|
||||||
# contains a count of problematic messages; else it won't match the
|
# contains a count of problematic messages; else it won't match the
|
||||||
# pattern in awk, so assume no errors
|
# pattern in awk, so assume no errors
|
||||||
@@ -20,7 +22,7 @@ for filename in `ls *.po`; do
|
|||||||
|
|
||||||
# detect whether this sequence occurs in any .po file. It will break
|
# detect whether this sequence occurs in any .po file. It will break
|
||||||
# msgfmt on Windows.
|
# msgfmt on Windows.
|
||||||
badlines=`fgrep '#~|' ${filename} | wc -l`
|
badlines=`grep -Fc '#~|' "${filename}"`
|
||||||
|
|
||||||
# produce comma-separated values
|
# produce comma-separated values
|
||||||
echo "$filename,$complete,$((complete*100/total)),$badlines"
|
echo "$filename,$complete,$((complete*100/total)),$badlines"
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
for i in *.po; do
|
for i in *.po; do
|
||||||
sed -i '/^Project/d' $i
|
sed -i '/^Project/d' $i
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -1,16 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
# Run this script on a directory to handle PO files with no id
|
# Run this script on a directory to handle PO files with no id
|
||||||
|
DIRNAME=$(dirname "$0")
|
||||||
shopt -s nullglob
|
|
||||||
|
|
||||||
input_dirs="$*"
|
|
||||||
|
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
input_dirs[0]="${BASH_SOURCE[0]}/../"
|
set -- "$DIRNAME/../"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for dir in "${input_dirs[@]}"
|
for dir in "$@"
|
||||||
do
|
do
|
||||||
for po_file in "${dir}"/*.po; do
|
for po_file in "${dir}"/*.po; do
|
||||||
sed -i '/^Project/d' "$po_file"
|
sed -i '/^Project/d' "$po_file"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
# Report how complete each translation catalog is
|
# Report how complete each translation catalog is
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,18 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
# Run this script with /locale/script/ as the current directory
|
# Run this script with /locale/script/ as the current directory
|
||||||
set -o errexit
|
set -o errexit
|
||||||
|
|
||||||
|
DIRNAME=$(dirname "$0")
|
||||||
|
|
||||||
echo ";; Recreating tenacity.pot using .h, .cpp and .mm files"
|
echo ";; Recreating tenacity.pot using .h, .cpp and .mm files"
|
||||||
for path in "${BASH_SOURCE[0]}/../modules/mod-*" "${BASH_SOURCE[0]}/../libraries/lib-*" "${BASH_SOURCE[0]}/../include" "${BASH_SOURCE[0]}/../src" ; do
|
for path in "$DIRNAME/../modules/mod-*" "$DIRNAME/../libraries/lib-*" "$DIRNAME/../include" "$DIRNAME/../src" ; do
|
||||||
find "$path" -name \*.h -o -name \*.cpp -o -name \*.mm
|
find "$path" -name \*.h -o -name \*.cpp -o -name \*.mm
|
||||||
done | LANG=c sort | \
|
done | LANG=c sort | \
|
||||||
sed -E 's/\.\.\///g' |\
|
sed -E 's/\.\.\///g' |\
|
||||||
xargs xgettext \
|
xargs xgettext \
|
||||||
--no-wrap \
|
--no-wrap \
|
||||||
--default-domain=tenacity \
|
--default-domain=tenacity \
|
||||||
--directory="${BASH_SOURCE[0]}/../.." \
|
--directory="$DIRNAME/../.." \
|
||||||
--keyword=_ --keyword=XO --keyword=XC:1,2c --keyword=XXO --keyword=XXC:1,2c --keyword=XP:1,2 --keyword=XPC:1,2,4c \
|
--keyword=_ --keyword=XO --keyword=XC:1,2c --keyword=XXO --keyword=XXC:1,2c --keyword=XP:1,2 --keyword=XPC:1,2,4c \
|
||||||
--add-comments=" i18n" \
|
--add-comments=" i18n" \
|
||||||
--add-location=file \
|
--add-location=file \
|
||||||
@@ -18,15 +20,15 @@ xargs xgettext \
|
|||||||
--package-name="tenacity" \
|
--package-name="tenacity" \
|
||||||
--package-version='3.0.4' \
|
--package-version='3.0.4' \
|
||||||
--msgid-bugs-address="emabrey@tenacityaudio.org" \
|
--msgid-bugs-address="emabrey@tenacityaudio.org" \
|
||||||
--add-location=file -L C -o "${BASH_SOURCE[0]}/../tenacity.pot"
|
--add-location=file -L C -o "$DIRNAME/../tenacity.pot"
|
||||||
|
|
||||||
echo ";; Adding nyquist files to tenacity.pot"
|
echo ";; Adding nyquist files to tenacity.pot"
|
||||||
for path in "${BASH_SOURCE[0]}/../../plug-ins/"* ; do find "$path" -name \*.ny -not -name rms.ny; done | LANG=c sort | \
|
for path in "$DIRNAME/../../plug-ins/"* ; do find "$path" -name \*.ny -not -name rms.ny; done | LANG=c sort | \
|
||||||
sed -E 's/\.\.\///g' |\
|
sed -E 's/\.\.\///g' |\
|
||||||
xargs xgettext \
|
xargs xgettext \
|
||||||
--no-wrap \
|
--no-wrap \
|
||||||
--default-domain=tenacity \
|
--default-domain=tenacity \
|
||||||
--directory="${BASH_SOURCE[0]}/../.." \
|
--directory="$DIRNAME/../.." \
|
||||||
--keyword=_ --keyword=_C:1,2c --keyword=ngettext:1,2 --keyword=ngettextc:1,2,4c \
|
--keyword=_ --keyword=_C:1,2c --keyword=ngettext:1,2 --keyword=ngettextc:1,2,4c \
|
||||||
--add-comments=" i18n" \
|
--add-comments=" i18n" \
|
||||||
--add-location=file \
|
--add-location=file \
|
||||||
@@ -34,11 +36,11 @@ xargs xgettext \
|
|||||||
--package-name="tenacity" \
|
--package-name="tenacity" \
|
||||||
--package-version='3.0.4' \
|
--package-version='3.0.4' \
|
||||||
--msgid-bugs-address="emabrey@tenacityaudio.org" \
|
--msgid-bugs-address="emabrey@tenacityaudio.org" \
|
||||||
--add-location=file -L Lisp -j -o "${BASH_SOURCE[0]}/../tenacity.pot"
|
--add-location=file -L Lisp -j -o "$DIRNAME/../tenacity.pot"
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo ";; POT file generated"
|
echo ";; POT file generated"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
head -n 11 "${BASH_SOURCE[0]}/../tenacity.pot" | tail -n 3
|
head -n 11 "$DIRNAME/../tenacity.pot" | tail -n 3
|
||||||
wc -l "${BASH_SOURCE[0]}/../tenacity.pot"
|
wc -l "$DIRNAME/../tenacity.pot"
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
|
|
||||||
# Function to retrieve a value from a plist
|
# Function to retrieve a value from a plist
|
||||||
function plist
|
plist()
|
||||||
{
|
{
|
||||||
/usr/libexec/PlistBuddy -c "Print ${2}" "${1}"
|
/usr/libexec/PlistBuddy -c "Print ${2}" "${1}"
|
||||||
}
|
}
|
||||||
|
|
||||||
function realpath
|
realpath()
|
||||||
{
|
{
|
||||||
python -c "import os; import sys; print(os.path.realpath(sys.argv[1]))" "${1}"
|
python -c "import os; import sys; print(os.path.realpath(sys.argv[1]))" "${1}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Function to notarize a file (APP or DMG)
|
# Function to notarize a file (APP or DMG)
|
||||||
function notarize
|
notarize()
|
||||||
{
|
{
|
||||||
# Bail if not signing
|
# Bail if not signing
|
||||||
if [ -z "${SIGNING}" ]
|
if [ -z "${SIGNING}" ]
|
||||||
@@ -80,7 +80,7 @@ function notarize
|
|||||||
rm "${OUTPUT}"
|
rm "${OUTPUT}"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ -z "${SRCROOT}" -o -z "${DSTROOT}" ]
|
if [ -z "${SRCROOT}" ] || [ -z "${DSTROOT}" ]
|
||||||
then
|
then
|
||||||
if [ "${#}" -ne 2 ]
|
if [ "${#}" -ne 2 ]
|
||||||
then
|
then
|
||||||
@@ -129,8 +129,9 @@ IDENT=$(plist "${DSTROOT}/Tenacity.app/Contents/Info.plist" "CFBundleIdentifier"
|
|||||||
SIGNING=
|
SIGNING=
|
||||||
if [ -r ~/.tenacity_signing ]
|
if [ -r ~/.tenacity_signing ]
|
||||||
then
|
then
|
||||||
source ~/.tenacity_signing
|
. ~/.tenacity_signing
|
||||||
if [ -n "${CODESIGN_APP_IDENTITY}" -a -n "${NOTARIZE_USERNAME}" -a -n "${NOTARIZE_PASSWORD}" ]
|
if [ -n "${CODESIGN_APP_IDENTITY}" ] && [ -n "${NOTARIZE_USERNAME}" ] &&
|
||||||
|
[ -n "${NOTARIZE_PASSWORD}" ]
|
||||||
then
|
then
|
||||||
SIGNING="y"
|
SIGNING="y"
|
||||||
fi
|
fi
|
||||||
@@ -144,7 +145,7 @@ cd "${DSTROOT}/.."
|
|||||||
|
|
||||||
# Make sure we have consistent ownership and permissions
|
# Make sure we have consistent ownership and permissions
|
||||||
chmod -RH 755 "${DSTROOT}"
|
chmod -RH 755 "${DSTROOT}"
|
||||||
chown -RH $(id -u):$(id -g) "${DSTROOT}"
|
chown -RH "$(id -u):$(id -g)" "${DSTROOT}"
|
||||||
|
|
||||||
# Preclean
|
# Preclean
|
||||||
rm -rf "$DMG" "$DMG.dmg" TMP.dmg
|
rm -rf "$DMG" "$DMG.dmg" TMP.dmg
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# You can use this to build wxWidgets. Just run it from within the root of the
|
# You can use this to build wxWidgets. Just run it from within the root of the
|
||||||
# wxWidgets source tree like so:
|
# wxWidgets source tree like so:
|
||||||
@@ -13,7 +13,7 @@ minver=10.7
|
|||||||
sdkdir=""
|
sdkdir=""
|
||||||
|
|
||||||
# Build a specific configuration
|
# Build a specific configuration
|
||||||
function bld
|
bld()
|
||||||
{
|
{
|
||||||
flavour="${1}"
|
flavour="${1}"
|
||||||
shift
|
shift
|
||||||
@@ -21,34 +21,35 @@ function bld
|
|||||||
# Create and change to our build directory
|
# Create and change to our build directory
|
||||||
rm -rf "bld_${flavour}_${arch}"
|
rm -rf "bld_${flavour}_${arch}"
|
||||||
mkdir -p "bld_${flavour}_${arch}"
|
mkdir -p "bld_${flavour}_${arch}"
|
||||||
pushd "bld_${flavour}_${arch}"
|
(
|
||||||
|
cd "bld_${flavour}_${arch}"
|
||||||
|
|
||||||
# Force Audacity specific options
|
# Force Audacity specific options
|
||||||
export CXX="g++ -std=c++1z -stdlib=libc++"
|
export CXX="g++ -std=c++1z -stdlib=libc++"
|
||||||
export LD="g++ -std=c++1z -stdlib=libc++"
|
export LD="g++ -std=c++1z -stdlib=libc++"
|
||||||
|
|
||||||
# NOTES: liblzma isn't available on MacOS 10.8 or older and Audacity doesn't
|
# NOTES: liblzma isn't available on MacOS 10.8 or older and Audacity doesn't
|
||||||
# need it. So, build wxWidgets without the support to allow Audacity
|
# need it. So, build wxWidgets without the support to allow Audacity
|
||||||
# to run on MacOS 10.7 or newer.
|
# to run on MacOS 10.7 or newer.
|
||||||
../configure --prefix="/usr/local/${arch}" \
|
../configure --prefix="/usr/local/${arch}" \
|
||||||
--enable-macosx-arch="${arch}" \
|
--enable-macosx-arch="${arch}" \
|
||||||
--enable-shared=yes \
|
--enable-shared=yes \
|
||||||
--enable-unicode=yes \
|
--enable-unicode=yes \
|
||||||
--enable-universal_binary=no \
|
--enable-universal_binary=no \
|
||||||
--enable-webkit=no \
|
--enable-webkit=no \
|
||||||
--with-expat=builtin \
|
--with-expat=builtin \
|
||||||
--with-flavour="${flavour}" \
|
--with-flavour="${flavour}" \
|
||||||
--with-libjpeg=builtin \
|
--with-libjpeg=builtin \
|
||||||
--with-libpng=builtin \
|
--with-libpng=builtin \
|
||||||
--with-libtiff=builtin \
|
--with-libtiff=builtin \
|
||||||
--with-macosx-sdk="${sdkdir}" \
|
--with-macosx-sdk="${sdkdir}" \
|
||||||
--with-macosx-version-min="${minver}" \
|
--with-macosx-version-min="${minver}" \
|
||||||
--with-regex=builtin \
|
--with-regex=builtin \
|
||||||
--with-zlib=builtin \
|
--with-zlib=builtin \
|
||||||
--without-liblzma \
|
--without-liblzma \
|
||||||
${@}
|
"${@}"
|
||||||
make -j $(sysctl -n hw.ncpu) install
|
make -j "$(sysctl -n hw.ncpu)" install
|
||||||
popd
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
# Only build 32-bit version if running on 10.14 or older and
|
# Only build 32-bit version if running on 10.14 or older and
|
||||||
@@ -56,8 +57,7 @@ function bld
|
|||||||
arches="x86_64"
|
arches="x86_64"
|
||||||
osver="$(sw_vers -productVersion)"
|
osver="$(sw_vers -productVersion)"
|
||||||
sdkver="$(xcrun --show-sdk-version)"
|
sdkver="$(xcrun --show-sdk-version)"
|
||||||
if [ "${osver}" \< "10.15" -a "${sdkver}" \< "10.14" ]
|
if expr "${osver}" \< "10.15" && expr "${sdkver}" \< "10.14"; then
|
||||||
then
|
|
||||||
arches="${arches} i386"
|
arches="${arches} i386"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -14,26 +14,26 @@ resolve()
|
|||||||
|
|
||||||
update_paths()
|
update_paths()
|
||||||
{
|
{
|
||||||
local indent="${1}"
|
_indent="${1}"
|
||||||
local path=$(resolve "${2}")
|
_path=$(resolve "${2}")
|
||||||
local base="${path##*/}"
|
_base="${_path##*/}"
|
||||||
|
|
||||||
if [ -e "${LIBPATH}/${base}" ]
|
if [ -e "${LIBPATH}/${_base}" ]
|
||||||
then
|
then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "%${indent}.${indent}cCopying '${path}' into bundle\n" " "
|
|
||||||
cp -p "${path}" "${LIBPATH}"
|
|
||||||
|
|
||||||
for lib in $(otool -L "${path}" | awk '/libwx.*dylib /{print $1}')
|
printf "%${_indent}.${_indent}cCopying '${_path}' into bundle\n" " "
|
||||||
|
cp -p "${_path}" "${LIBPATH}"
|
||||||
|
|
||||||
|
for lib in $(otool -L "${_path}" | awk '/libwx.*dylib /{print $1}')
|
||||||
do
|
do
|
||||||
path=$(resolve "${lib}")
|
_path=$(resolve "${lib}")
|
||||||
|
|
||||||
printf "%${indent}.${indent}cChanging '${lib}' to '@loader_path/../Frameworks/${path##*/}'\n" " "
|
printf "%${_indent}.${_indent}cChanging '${lib}' to '@loader_path/../Frameworks/${path##*/}'\n" " "
|
||||||
install_name_tool -change "${lib}" "@loader_path/../Frameworks/${path##*/}" "${LIBPATH}/${base}"
|
install_name_tool -change "${lib}" "@loader_path/../Frameworks/${path##*/}" "${LIBPATH}/${_base}"
|
||||||
|
|
||||||
update_paths $((indent + 2)) "${path}"
|
update_paths $((_indent + 2)) "${_path}"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/bin/sh
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
objcopy --only-keep-debug --compress-debug-section=zlib "${1}" "${1}.debug"
|
objcopy --only-keep-debug --compress-debug-section=zlib "${1}" "${1}.debug"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/bin/sh
|
||||||
|
|
||||||
((${BASH_VERSION%%.*} >= 4)) || { echo >&2 "$0: Error: Please upgrade Bash."; exit 1; }
|
((${BASH_VERSION%%.*} >= 4)) || { echo >&2 "$0: Error: Please upgrade Bash."; exit 1; }
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@ max_retry=12
|
|||||||
counter=0
|
counter=0
|
||||||
num_secs_await_retry=20
|
num_secs_await_retry=20
|
||||||
|
|
||||||
echo "Trying: /usr/bin/hdiutil $@"
|
echo "Trying: /usr/bin/hdiutil $*"
|
||||||
|
|
||||||
until /usr/bin/hdiutil "$@"; do
|
until /usr/bin/hdiutil "$@"; do
|
||||||
sleep $num_secs_await_retry
|
sleep $num_secs_await_retry
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
# Copyright 2003, 2004, 2005 Dominic Mazzoni and Matt Brubeck
|
# Copyright 2003, 2004, 2005 Dominic Mazzoni and Matt Brubeck
|
||||||
# Distributed under the GNU General Public License 2.0.
|
# Distributed under the GNU General Public License 2.0.
|
||||||
# See the file LICENSE.txt for details.
|
# See the file LICENSE.txt for details.
|
||||||
# Re-written in Bash by Richard Ash 2006 - 2013
|
# Re-written in Bash by Richard Ash 2006 - 2013
|
||||||
|
|
||||||
function myrmrvf {
|
myrmrvf() {
|
||||||
# a replacement for rm -rvf that has it's output controlled
|
# a replacement for rm -rvf that has it's output controlled
|
||||||
# by the value of the first argument
|
# by the value of the first argument
|
||||||
# setting it to 1 makes it verbose, to anything else makes it quiet
|
# setting it to 1 makes it verbose, to anything else makes it quiet
|
||||||
if [ $1 -eq 1 ] ; then #verbose mode
|
if [ "$1" -eq 1 ] ; then #verbose mode
|
||||||
shift
|
shift
|
||||||
echo "rm -rf $*"
|
echo "rm -rf $*"
|
||||||
rm -rf $*
|
rm -rf $*
|
||||||
@@ -20,11 +20,11 @@ function myrmrvf {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function myrmvf {
|
myrmvf() {
|
||||||
# a replacement for rm -vf that has it's output controlled
|
# a replacement for rm -vf that has it's output controlled
|
||||||
# by the value of the first argument
|
# by the value of the first argument
|
||||||
# setting it to 1 makes it verbose, to anything else makes it quiet
|
# setting it to 1 makes it verbose, to anything else makes it quiet
|
||||||
if [ $1 -eq 1 ] ; then #verbose mode
|
if [ "$1" -eq 1 ] ; then #verbose mode
|
||||||
shift
|
shift
|
||||||
echo "rm -f $*"
|
echo "rm -f $*"
|
||||||
rm -f $*
|
rm -f $*
|
||||||
@@ -35,23 +35,23 @@ function myrmvf {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function myfindrm {
|
myfindrm() {
|
||||||
# search the file tree removing files that match the specified pattern in
|
# search the file tree removing files that match the specified pattern in
|
||||||
# the second argument, with output controlled by the value of the first
|
# the second argument, with output controlled by the value of the first
|
||||||
# argument.
|
# argument.
|
||||||
# setting it to 1 makes it verbose, to anything else makes it quiet
|
# setting it to 1 makes it verbose, to anything else makes it quiet
|
||||||
if [ $1 -eq 1 ] ; then
|
if [ "$1" -eq 1 ] ; then
|
||||||
find . -name "$2" -print -delete
|
find . -name "$2" -print -delete
|
||||||
else
|
else
|
||||||
find . -name "$2" -delete
|
find . -name "$2" -delete
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function cleanfulltree {
|
cleanfulltree() {
|
||||||
# does the clean-up op on the full source tree prior to building the full
|
# does the clean-up op on the full source tree prior to building the full
|
||||||
# tarball
|
# tarball
|
||||||
printf "making distclean ... "
|
printf "making distclean ... "
|
||||||
if [ $1 -eq 1 ] ; then
|
if [ "$1" -eq 1 ] ; then
|
||||||
make distclean
|
make distclean
|
||||||
else
|
else
|
||||||
make distclean 2>/dev/null > /dev/null
|
make distclean 2>/dev/null > /dev/null
|
||||||
@@ -65,98 +65,98 @@ function cleanfulltree {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
printf "removing GIT directories ... "
|
printf "removing GIT directories ... "
|
||||||
myrmrvf $1 .git .gitignore
|
myrmrvf "$1" .git .gitignore
|
||||||
myrmrvf $1 .gitignore
|
myrmrvf "$1" .gitignore
|
||||||
myrmrvf $1 .gitattributes
|
myrmrvf "$1" .gitattributes
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
|
|
||||||
printf "removing vim / emacs temp files ... "
|
printf "removing vim / emacs temp files ... "
|
||||||
myfindrm $1 "*~"
|
myfindrm "$1" "*~"
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
|
|
||||||
printf "removing Python droppings ... "
|
printf "removing Python droppings ... "
|
||||||
myfindrm $1 "*.pyc"
|
myfindrm "$1" "*.pyc"
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
|
|
||||||
printf "removing executable and other intermediate files ... "
|
printf "removing executable and other intermediate files ... "
|
||||||
myrmvf $1 src/tenacity src/.depend src/.gchdepend
|
myrmvf "$1" src/tenacity src/.depend src/.gchdepend
|
||||||
myfindrm $1 config.status
|
myfindrm "$1" config.status
|
||||||
myfindrm $1 config.log
|
myfindrm "$1" config.log
|
||||||
myfindrm $1 config.cache
|
myfindrm "$1" config.cache
|
||||||
find . -depth -name 'autom4te.cache' -execdir rm -rf '{}' ';'
|
find . -depth -name 'autom4te.cache' -execdir rm -rf '{}' ';'
|
||||||
find . -depth -name '.deps' -execdir rm -rf '{}' ';'
|
find . -depth -name '.deps' -execdir rm -rf '{}' ';'
|
||||||
myfindrm $1 aclocal.m4
|
myfindrm "$1" aclocal.m4
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
|
|
||||||
printf "removing orphaned symlinks in lib-src/ ... "
|
printf "removing orphaned symlinks in lib-src/ ... "
|
||||||
myrmvf $1 lib-src/*.a
|
myrmvf "$1" lib-src/*.a
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
|
|
||||||
printf "removing doxygen output files ... "
|
printf "removing doxygen output files ... "
|
||||||
myrmrvf $1 dox
|
myrmrvf "$1" dox
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
|
|
||||||
printf "removing unused libraries from GIT tree ..."
|
printf "removing unused libraries from GIT tree ..."
|
||||||
myrmrvf $1 lib-src/libscorealign
|
myrmrvf "$1" lib-src/libscorealign
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
# remove all the things we have in GIT for convenience rather than being
|
# remove all the things we have in GIT for convenience rather than being
|
||||||
# necessary
|
# necessary
|
||||||
function slimtree {
|
slimtree() {
|
||||||
printf "removing todo lists ... "
|
printf "removing todo lists ... "
|
||||||
myrmvf $1 todo.txt
|
myrmvf "$1" todo.txt
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
|
|
||||||
# we cannot remove tests/ because subsequent builds fail ...
|
# we cannot remove tests/ because subsequent builds fail ...
|
||||||
printf "removing scripts and tests ... "
|
printf "removing scripts and tests ... "
|
||||||
myrmrvf $1 scripts tests/ProjectCheckTests/
|
myrmrvf "$1" scripts tests/ProjectCheckTests/
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
|
|
||||||
printf "removing libraries that should be installed locally ... "
|
printf "removing libraries that should be installed locally ... "
|
||||||
myrmrvf $1 lib-src/expat lib-src/libid3tag
|
myrmrvf "$1" lib-src/expat lib-src/libid3tag
|
||||||
myrmrvf $1 lib-src/libmad lib-src/libogg
|
myrmrvf "$1" lib-src/libmad lib-src/libogg
|
||||||
myrmrvf $1 lib-src/libvorbis lib-src/soundtouch
|
myrmrvf "$1" lib-src/libvorbis lib-src/soundtouch
|
||||||
# these bindings aren't built by default, we don't need them
|
# these bindings aren't built by default, we don't need them
|
||||||
myrmrvf $1 lib-src/portaudio-v19/bindings/
|
myrmrvf "$1" lib-src/portaudio-v19/bindings/
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
|
|
||||||
printf "removing qa ... "
|
printf "removing qa ... "
|
||||||
myrmrvf $1 qa
|
myrmrvf "$1" qa
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
|
|
||||||
printf "removing unused portaudio-v19 directories ... "
|
printf "removing unused portaudio-v19 directories ... "
|
||||||
myrmrvf $1 lib-src/portaudio-v19/docs
|
myrmrvf "$1" lib-src/portaudio-v19/docs
|
||||||
myrmrvf $1 lib-src/portaudio-v19/pa_asio
|
myrmrvf "$1" lib-src/portaudio-v19/pa_asio
|
||||||
myrmrvf $1 lib-src/portaudio-v19/pa_sgi
|
myrmrvf "$1" lib-src/portaudio-v19/pa_sgi
|
||||||
myrmrvf $1 lib-src/portaudio-v19/pa_mac_sm
|
myrmrvf "$1" lib-src/portaudio-v19/pa_mac_sm
|
||||||
myrmrvf $1 lib-src/portaudio-v19/testcvs
|
myrmrvf "$1" lib-src/portaudio-v19/testcvs
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
|
|
||||||
printf "removing unused portmidi directories ... "
|
printf "removing unused portmidi directories ... "
|
||||||
myrmrvf $1 lib-src/portmidi/pm_cl
|
myrmrvf "$1" lib-src/portmidi/pm_cl
|
||||||
myrmrvf $1 lib-src/portmidi/pm_csharp
|
myrmrvf "$1" lib-src/portmidi/pm_csharp
|
||||||
myrmrvf $1 lib-src/portmidi/pm_dylib
|
myrmrvf "$1" lib-src/portmidi/pm_dylib
|
||||||
myrmrvf $1 lib-src/portmidi/pm_java
|
myrmrvf "$1" lib-src/portmidi/pm_java
|
||||||
myrmrvf $1 lib-src/portmidi/pm_mingw
|
myrmrvf "$1" lib-src/portmidi/pm_mingw
|
||||||
myrmrvf $1 lib-src/portmidi/pm_python
|
myrmrvf "$1" lib-src/portmidi/pm_python
|
||||||
myrmrvf $1 lib-src/portmidi/pm_qt
|
myrmrvf "$1" lib-src/portmidi/pm_qt
|
||||||
myrmrvf $1 lib-src/portmidi/pm_test
|
myrmrvf "$1" lib-src/portmidi/pm_test
|
||||||
myrmrvf $1 lib-src/portmidi/portmidi_cdt.zip
|
myrmrvf "$1" lib-src/portmidi/portmidi_cdt.zip
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
|
|
||||||
printf "removing Nyquist plug-ins that are just for show ... "
|
printf "removing Nyquist plug-ins that are just for show ... "
|
||||||
myrmvf $1 plug-ins/analyze.ny plug-ins/fadein.ny plug-ins/fadeout.ny
|
myrmvf "$1" plug-ins/analyze.ny plug-ins/fadein.ny plug-ins/fadeout.ny
|
||||||
myrmvf $1 plug-ins/undcbias.ny
|
myrmvf "$1" plug-ins/undcbias.ny
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
|
|
||||||
printf "Removing developer scripts not needed to build tenacity ... "
|
printf "Removing developer scripts not needed to build tenacity ... "
|
||||||
myrmrvf $1 scripts/mw2html_audacity
|
myrmrvf "$1" scripts/mw2html_audacity
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
|
|
||||||
printf "Removing Mac and Windows build files ... "
|
printf "Removing Mac and Windows build files ... "
|
||||||
myrmrvf $1 mac
|
myrmrvf "$1" mac
|
||||||
myrmrvf $1 win
|
myrmrvf "$1" win
|
||||||
printf "Done\n"
|
printf "Done\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -209,7 +209,7 @@ if [ -f "lib-src/Makefile" ] ; then
|
|||||||
# we have a Makefile - is it new enough?
|
# we have a Makefile - is it new enough?
|
||||||
t2=$(date +%s -r "lib-src/Makefile")
|
t2=$(date +%s -r "lib-src/Makefile")
|
||||||
t1=$(date +%s -r "lib-src/Makefile.in")
|
t1=$(date +%s -r "lib-src/Makefile.in")
|
||||||
if [ $t1 -gt $t2 ] ; then
|
if [ "$t1" -gt "$t2" ] ; then
|
||||||
# not new enough, reconfigure
|
# not new enough, reconfigure
|
||||||
reconf=1
|
reconf=1
|
||||||
fi
|
fi
|
||||||
@@ -251,7 +251,7 @@ if [ ! -x "config.status" ] ; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n "Getting program version ... "
|
printf "Getting program version ... "
|
||||||
# first off, find out what C++ pre-processor configure has found for us to use
|
# first off, find out what C++ pre-processor configure has found for us to use
|
||||||
# (because we want the same one that will be used to build Audacity). This is a
|
# (because we want the same one that will be used to build Audacity). This is a
|
||||||
# neat trick using the config.status script left behind after configure has
|
# neat trick using the config.status script left behind after configure has
|
||||||
@@ -260,7 +260,7 @@ cppprog="$(echo '@CXX@' | ./config.status --file=-)"
|
|||||||
|
|
||||||
# run the preprocessor, convert output to shell variables, and evaluate to
|
# run the preprocessor, convert output to shell variables, and evaluate to
|
||||||
# define them
|
# define them
|
||||||
eval $(cpp -E <<CPPEOF | sed -e 's/wxT("//g' \
|
eval "$(cpp -E <<CPPEOF | sed -e 's/wxT("//g' \
|
||||||
-e 's/")//g' \
|
-e 's/")//g' \
|
||||||
-e 's/ //g' \
|
-e 's/ //g' \
|
||||||
-e "s/__TDATE__/$(date +%Y%m%d)/" \
|
-e "s/__TDATE__/$(date +%Y%m%d)/" \
|
||||||
@@ -270,7 +270,7 @@ eval $(cpp -E <<CPPEOF | sed -e 's/wxT("//g' \
|
|||||||
-e 'd'
|
-e 'd'
|
||||||
#include "src/Audacity.h"
|
#include "src/Audacity.h"
|
||||||
CPPEOF
|
CPPEOF
|
||||||
)
|
)"
|
||||||
|
|
||||||
version="${GIT_DESCRIBE}"
|
version="${GIT_DESCRIBE}"
|
||||||
printf "${version}\n"
|
printf "${version}\n"
|
||||||
|
|||||||
Reference in New Issue
Block a user