[vlc-devel] [PATCH 3/4] Cosmetic: white spacing for contrib scripts
Faustino E. Osuna
enrique.osuna at gmail.com
Wed Dec 14 20:24:23 CET 2011
- Change tab characters to 4 character spaces.
- Align indents at 4 character spaces.
---
contrib/bootstrap | 198 +++++++++++++++++++++++-----------------------
contrib/src/get-arch.sh | 40 +++++-----
2 files changed, 119 insertions(+), 119 deletions(-)
diff --git a/contrib/bootstrap b/contrib/bootstrap
index 9ad1068..3b6a8c6 100755
--- a/contrib/bootstrap
+++ b/contrib/bootstrap
@@ -20,14 +20,14 @@
#
usage()
{
- echo "Usage: $0 [--build=BUILD] [--host=HOST] [--prefix=PREFIX]"
- echo " --build=BUILD configure for building on BUILD"
- echo " --host=HOST cross-compile to build to run on HOST"
- echo " --prefix=PREFIX install files in PREFIX"
- echo " --disable-FOO configure to not build package FOO"
- echo " --enable-FOO configure to build package FOO"
- echo " --disable-disc configure to not build optical discs packages"
- echo " --disable-sout configure to not build stream output packages"
+ echo "Usage: $0 [--build=BUILD] [--host=HOST] [--prefix=PREFIX]"
+ echo " --build=BUILD configure for building on BUILD"
+ echo " --host=HOST cross-compile to build to run on HOST"
+ echo " --prefix=PREFIX install files in PREFIX"
+ echo " --disable-FOO configure to not build package FOO"
+ echo " --enable-FOO configure to build package FOO"
+ echo " --disable-disc configure to not build optical discs packages"
+ echo " --disable-sout configure to not build stream output packages"
}
BUILD=
@@ -40,69 +40,69 @@ BUILD_DISCS="1"
if test ! -f "../../contrib/src/main.mak"
then
- echo "$0 must be run from a subdirectory"
- exit 1
+ echo "$0 must be run from a subdirectory"
+ exit 1
fi
while test -n "$1"
do
- case "$1" in
- --build=*)
- BUILD="${1#--build=}"
- ;;
- --help|-h)
- usage
- exit 0
- ;;
- --host=*)
- HOST="${1#--host=}"
- ;;
- --prefix=*)
- PREFIX="${1#--prefix=}"
- ;;
- --disable-disc)
- BUILD_DISCS=
- ;;
- --disable-sout)
- BUILD_ENCODERS=
- ;;
- --disable-*)
- PKGS_DISABLE="${PKGS_DISABLE} ${1#--disable-}"
- ;;
- --enable-*)
- PKGS_ENABLE="${PKGS_ENABLE} ${1#--enable-}"
- ;;
- *)
- echo "Unrecognized options $1"
- usage
- exit 1
- ;;
- esac
- shift
+ case "$1" in
+ --build=*)
+ BUILD="${1#--build=}"
+ ;;
+ --help|-h)
+ usage
+ exit 0
+ ;;
+ --host=*)
+ HOST="${1#--host=}"
+ ;;
+ --prefix=*)
+ PREFIX="${1#--prefix=}"
+ ;;
+ --disable-disc)
+ BUILD_DISCS=
+ ;;
+ --disable-sout)
+ BUILD_ENCODERS=
+ ;;
+ --disable-*)
+ PKGS_DISABLE="${PKGS_DISABLE} ${1#--disable-}"
+ ;;
+ --enable-*)
+ PKGS_ENABLE="${PKGS_ENABLE} ${1#--enable-}"
+ ;;
+ *)
+ echo "Unrecognized options $1"
+ usage
+ exit 1
+ ;;
+ esac
+ shift
done
if test -z "$BUILD"
then
- echo -n "Guessing build system... "
- BUILD="`cc -dumpmachine`"
- if test -z "$BUILD"; then
- echo "FAIL!"
- exit 1
- fi
- echo "$BUILD"
+ echo -n "Guessing build system... "
+ BUILD="`cc -dumpmachine`"
+ if test -z "$BUILD"; then
+ echo "FAIL!"
+ exit 1
+ fi
+ echo "$BUILD"
fi
if test -z "$HOST"
then
- echo -n "Guessing host system... "
- HOST="$BUILD"
- echo "$HOST"
+ echo -n "Guessing host system... "
+ HOST="$BUILD"
+ echo "$HOST"
fi
if test "$PREFIX"
then
- # strip trailing slash
- PREFIX="${PREFIX%/}"
+ # strip trailing slash
+ PREFIX="${PREFIX%/}"
fi
#
@@ -121,41 +121,41 @@ EOF
add_make()
{
- while test -n "$1"
- do
- echo "$1" >&3
- shift
- done
+ while test -n "$1"
+ do
+ echo "$1" >&3
+ shift
+ done
}
add_make_enabled()
{
- while test -n "$1"
- do
- add_make "$1 := 1"
- shift
- done
+ while test -n "$1"
+ do
+ add_make "$1 := 1"
+ shift
+ done
}
check_macosx_sdk()
{
- [ -z "${OSX_VERSION}" ] && echo "OSX_VERSION not specified, assuming 10.5" && OSX_VERSION=10.5
- SDK="/Developer/SDKs/MacOSX${OSX_VERSION}.sdk"
- if [ ! -d "${SDK}" ]
- then
- echo "
+ [ -z "${OSX_VERSION}" ] && echo "OSX_VERSION not specified, assuming 10.5" && OSX_VERSION=10.5
+ SDK="/Developer/SDKs/MacOSX${OSX_VERSION}.sdk"
+ if [ ! -d "${SDK}" ]
+ then
+ echo "
*** ${SDK} does not exist, please install required SDK, or use export OSX_VERSION=10.6 ***
"
- exit 1
- fi
- add_make "OSX_VERSION ?= ${OSX_VERSION}"
+ exit 1
+ fi
+ add_make "OSX_VERSION ?= ${OSX_VERSION}"
}
check_android_sdk()
{
- [ -z "${ANDROID_NDK}" ] && echo "You must set ANDROID_NDK environment variable" && exit 1
- add_make "ANDROID_NDK := ${ANDROID_NDK}"
- test -z "${NO_NEON}" && add_make_enabled "HAVE_NEON"
+ [ -z "${ANDROID_NDK}" ] && echo "You must set ANDROID_NDK environment variable" && exit 1
+ add_make "ANDROID_NDK := ${ANDROID_NDK}"
+ test -z "${NO_NEON}" && add_make_enabled "HAVE_NEON"
}
test -z "$PREFIX" || add_make "PREFIX := $PREFIX"
@@ -167,29 +167,29 @@ test -z "$BUILD_ENCODERS" || add_make_enabled "BUILD_ENCODERS"
#
OS="${HOST#*-}" # strip architecture
case "${OS}" in
- apple-darwin*)
- check_macosx_sdk
- add_make_enabled "HAVE_MACOSX" "HAVE_DARWIN_OS" "HAVE_BSD"
- ;;
- *darwin*)
- add_make_enabled "HAVE_DARWIN_OS" "HAVE_BSD"
- ;;
- *bsd*)
- add_make_enabled "HAVE_BSD"
- ;;
- linux-androideabi)
- check_android_sdk
- add_make_enabled "HAVE_LINUX" "HAVE_ANDROID"
- ;;
- *linux*)
- add_make_enabled "HAVE_LINUX"
- ;;
- *wince*)
- add_make_enabled "HAVE_WINCE"
- ;;
- *mingw*)
- add_make_enabled "HAVE_WIN32"
- ;;
+ apple-darwin*)
+ check_macosx_sdk
+ add_make_enabled "HAVE_MACOSX" "HAVE_DARWIN_OS" "HAVE_BSD"
+ ;;
+ *darwin*)
+ add_make_enabled "HAVE_DARWIN_OS" "HAVE_BSD"
+ ;;
+ *bsd*)
+ add_make_enabled "HAVE_BSD"
+ ;;
+ linux-androideabi)
+ check_android_sdk
+ add_make_enabled "HAVE_LINUX" "HAVE_ANDROID"
+ ;;
+ *linux*)
+ add_make_enabled "HAVE_LINUX"
+ ;;
+ *wince*)
+ add_make_enabled "HAVE_WINCE"
+ ;;
+ *mingw*)
+ add_make_enabled "HAVE_WIN32"
+ ;;
esac
#
diff --git a/contrib/src/get-arch.sh b/contrib/src/get-arch.sh
index 2df77de..bd0bd0d 100755
--- a/contrib/src/get-arch.sh
+++ b/contrib/src/get-arch.sh
@@ -2,28 +2,28 @@
HOST="$1"
if test -z "$HOST"; then
- echo "Usage: $0 <target machine>" >&2
- exit 1
+ echo "Usage: $0 <target machine>" >&2
+ exit 1
fi
case "$HOST" in
- amd64-*)
- ARCH="x86_64"
- ;;
- i[3456]86-*)
- ARCH="i386"
- ;;
- powerpc-*|ppc-*)
- ARCH="ppc"
- ;;
- powerpc64-*|ppc64-*)
- ARCH="ppc64"
- ;;
- *-*)
- ARCH="${HOST%%-*}"
- ;;
- *)
- echo "$HOST: invalid machine specification" >&2
- exit 1
+ amd64-*)
+ ARCH="x86_64"
+ ;;
+ i[3456]86-*)
+ ARCH="i386"
+ ;;
+ powerpc-*|ppc-*)
+ ARCH="ppc"
+ ;;
+ powerpc64-*|ppc64-*)
+ ARCH="ppc64"
+ ;;
+ *-*)
+ ARCH="${HOST%%-*}"
+ ;;
+ *)
+ echo "$HOST: invalid machine specification" >&2
+ exit 1
esac
echo $ARCH
--
1.7.7.4
More information about the vlc-devel
mailing list