Bug 1279349 - Untabify js/src/make-source-package.sh; r=sfink

This commit is contained in:
Nick Fitzgerald 2016-06-12 08:01:26 -07:00
Родитель 1c383e41a7
Коммит 72b1047e0c
1 изменённых файлов: 122 добавлений и 122 удалений

Просмотреть файл

@ -15,11 +15,11 @@ set -e
: ${DIST:=/tmp}
if [[ -f "$SRCDIR/../../config/milestone.txt" ]]; then
MILESTONE="$(tail -1 $SRCDIR/../../config/milestone.txt)"
IFS=. read -a VERSION < <(echo "$MILESTONE")
MOZJS_MAJOR_VERSION=${MOZJS_MAJOR_VERSION:-${VERSION[0]}}
MOZJS_MINOR_VERSION=${MOZJS_MINOR_VERSION:-${VERSION[1]}}
MOZJS_PATCH_VERSION=${MOZJS_PATCH_VERSION:-${VERSION[2]}}
MILESTONE="$(tail -1 $SRCDIR/../../config/milestone.txt)"
IFS=. read -a VERSION < <(echo "$MILESTONE")
MOZJS_MAJOR_VERSION=${MOZJS_MAJOR_VERSION:-${VERSION[0]}}
MOZJS_MINOR_VERSION=${MOZJS_MINOR_VERSION:-${VERSION[1]}}
MOZJS_PATCH_VERSION=${MOZJS_PATCH_VERSION:-${VERSION[2]}}
fi
cmd=${1:-build}
@ -48,114 +48,114 @@ TOPSRCDIR=${SRCDIR}/../..
case $cmd in
"clean")
echo "Cleaning ${pkgpath} and ${tgtpath} ..."
rm -rf ${pkgpath} ${tgtpath}
;;
echo "Cleaning ${pkgpath} and ${tgtpath} ..."
rm -rf ${pkgpath} ${tgtpath}
;;
"build")
# Make sure that everything copied here is kept in sync with
# `testing/taskcluster/tasks/branches/base_jobs.yml`!
# Make sure that everything copied here is kept in sync with
# `testing/taskcluster/tasks/branches/base_jobs.yml`!
if [ -e ${tgtpath}/js/src/Makefile ]; then
echo "error: found js/src/Makefile. Please clean before packaging." >&2
exit 1
fi
if [ -e ${tgtpath}/js/src/Makefile ]; then
echo "error: found js/src/Makefile. Please clean before packaging." >&2
exit 1
fi
echo "Staging source tarball in ${tgtpath}..."
if [ -d ${tgtpath} ]; then
echo "WARNING - dist tree ${tgtpath} already exists!"
fi
${MKDIR} -p ${tgtpath}/js/src
echo "Staging source tarball in ${tgtpath}..."
if [ -d ${tgtpath} ]; then
echo "WARNING - dist tree ${tgtpath} already exists!"
fi
${MKDIR} -p ${tgtpath}/js/src
cp -pPR ${TOPSRCDIR}/configure.py \
${TOPSRCDIR}/moz.configure \
cp -pPR ${TOPSRCDIR}/configure.py \
${TOPSRCDIR}/moz.configure \
${TOPSRCDIR}/test.mozbuild \
${tgtpath}
${tgtpath}
cp -pPR ${TOPSRCDIR}/js/moz.configure ${tgtpath}/js
cp -pPR ${TOPSRCDIR}/js/moz.configure ${tgtpath}/js
mkdir -p ${tgtpath}/taskcluster
cp -pPR ${TOPSRCDIR}/taskcluster/moz.build ${tgtpath}/taskcluster/
mkdir -p ${tgtpath}/taskcluster
cp -pPR ${TOPSRCDIR}/taskcluster/moz.build ${tgtpath}/taskcluster/
# copy the embedded icu
${MKDIR} -p ${tgtpath}/intl
cp -pPR ${TOPSRCDIR}/intl/icu ${tgtpath}/intl
# copy the embedded icu
${MKDIR} -p ${tgtpath}/intl
cp -pPR ${TOPSRCDIR}/intl/icu ${tgtpath}/intl
# copy main moz.build and Makefile.in
cp -pPR ${TOPSRCDIR}/Makefile.in ${TOPSRCDIR}/moz.build ${tgtpath}
# copy main moz.build and Makefile.in
cp -pPR ${TOPSRCDIR}/Makefile.in ${TOPSRCDIR}/moz.build ${tgtpath}
# copy nspr.
cp -pPR ${SRCDIR}/../../nsprpub ${tgtpath}
# copy nspr.
cp -pPR ${SRCDIR}/../../nsprpub ${tgtpath}
# copy top-level build and config files.
cp -p ${TOPSRCDIR}/configure.py ${TOPSRCDIR}/moz.configure ${tgtpath}
# copy top-level build and config files.
cp -p ${TOPSRCDIR}/configure.py ${TOPSRCDIR}/moz.configure ${tgtpath}
# copy build and config directory.
cp -pPR ${TOPSRCDIR}/build ${TOPSRCDIR}/config ${tgtpath}
# copy build and config directory.
cp -pPR ${TOPSRCDIR}/build ${TOPSRCDIR}/config ${tgtpath}
# put in js itself
cp -pPR ${TOPSRCDIR}/mfbt ${tgtpath}
cp -p ${SRCDIR}/../moz.configure ${tgtpath}/js
cp -pPR ${SRCDIR}/../public ${tgtpath}/js
cp -pPR ${SRCDIR}/../examples ${tgtpath}/js
find ${SRCDIR} -mindepth 1 -maxdepth 1 -not -path ${STAGING} -a -not -name ${pkg} \
-exec cp -pPR {} ${tgtpath}/js/src \;
# put in js itself
cp -pPR ${TOPSRCDIR}/mfbt ${tgtpath}
cp -p ${SRCDIR}/../moz.configure ${tgtpath}/js
cp -pPR ${SRCDIR}/../public ${tgtpath}/js
cp -pPR ${SRCDIR}/../examples ${tgtpath}/js
find ${SRCDIR} -mindepth 1 -maxdepth 1 -not -path ${STAGING} -a -not -name ${pkg} \
-exec cp -pPR {} ${tgtpath}/js/src \;
cp -pPR \
${TOPSRCDIR}/python \
${tgtpath}
${MKDIR} -p ${tgtpath}/dom/bindings
cp -pPR \
${TOPSRCDIR}/dom/bindings/mozwebidlcodegen \
${tgtpath}/dom/bindings
${MKDIR} -p ${tgtpath}/media/webrtc/trunk/tools
cp -pPR \
${TOPSRCDIR}/media/webrtc/trunk/tools/gyp \
${tgtpath}/media/webrtc/trunk/tools
${MKDIR} -p ${tgtpath}/testing
cp -pPR \
${TOPSRCDIR}/testing/mozbase \
${tgtpath}/testing
${MKDIR} -p ${tgtpath}/modules
cp -pPR \
${TOPSRCDIR}/modules/fdlibm \
${tgtpath}/modules/fdlibm
cp -pPR \
${TOPSRCDIR}/modules/zlib/src/ \
${tgtpath}/modules/zlib
${MKDIR} -p ${tgtpath}/layout/tools/reftest
cp -pPR \
${TOPSRCDIR}/layout/tools/reftest/reftest \
${tgtpath}/layout/tools/reftest
${MKDIR} -p ${tgtpath}/toolkit/mozapps/installer
cp -pPR \
${TOPSRCDIR}/toolkit/mozapps/installer/package-name.mk \
${TOPSRCDIR}/toolkit/mozapps/installer/upload-files.mk \
${tgtpath}/toolkit/mozapps/installer
${MKDIR} -p ${tgtpath}/mozglue
cp -pPR \
${TOPSRCDIR}/mozglue/build \
${TOPSRCDIR}/mozglue/crt \
${TOPSRCDIR}/mozglue/misc \
${TOPSRCDIR}/mozglue/moz.build \
${tgtpath}/mozglue
${MKDIR} -p ${tgtpath}/memory
cp -pPR \
${TOPSRCDIR}/memory/moz.build \
${TOPSRCDIR}/memory/build \
${TOPSRCDIR}/memory/fallible \
${TOPSRCDIR}/memory/jemalloc \
${TOPSRCDIR}/memory/mozalloc \
${TOPSRCDIR}/memory/mozjemalloc \
${tgtpath}/memory
cp -pPR \
${TOPSRCDIR}/python \
${tgtpath}
${MKDIR} -p ${tgtpath}/dom/bindings
cp -pPR \
${TOPSRCDIR}/dom/bindings/mozwebidlcodegen \
${tgtpath}/dom/bindings
${MKDIR} -p ${tgtpath}/media/webrtc/trunk/tools
cp -pPR \
${TOPSRCDIR}/media/webrtc/trunk/tools/gyp \
${tgtpath}/media/webrtc/trunk/tools
${MKDIR} -p ${tgtpath}/testing
cp -pPR \
${TOPSRCDIR}/testing/mozbase \
${tgtpath}/testing
${MKDIR} -p ${tgtpath}/modules
cp -pPR \
${TOPSRCDIR}/modules/fdlibm \
${tgtpath}/modules/fdlibm
cp -pPR \
${TOPSRCDIR}/modules/zlib/src/ \
${tgtpath}/modules/zlib
${MKDIR} -p ${tgtpath}/layout/tools/reftest
cp -pPR \
${TOPSRCDIR}/layout/tools/reftest/reftest \
${tgtpath}/layout/tools/reftest
${MKDIR} -p ${tgtpath}/toolkit/mozapps/installer
cp -pPR \
${TOPSRCDIR}/toolkit/mozapps/installer/package-name.mk \
${TOPSRCDIR}/toolkit/mozapps/installer/upload-files.mk \
${tgtpath}/toolkit/mozapps/installer
${MKDIR} -p ${tgtpath}/mozglue
cp -pPR \
${TOPSRCDIR}/mozglue/build \
${TOPSRCDIR}/mozglue/crt \
${TOPSRCDIR}/mozglue/misc \
${TOPSRCDIR}/mozglue/moz.build \
${tgtpath}/mozglue
${MKDIR} -p ${tgtpath}/memory
cp -pPR \
${TOPSRCDIR}/memory/moz.build \
${TOPSRCDIR}/memory/build \
${TOPSRCDIR}/memory/fallible \
${TOPSRCDIR}/memory/jemalloc \
${TOPSRCDIR}/memory/mozalloc \
${TOPSRCDIR}/memory/mozjemalloc \
${tgtpath}/memory
# remove *.pyc and *.pyo files if any
find ${tgtpath} -type f -name "*.pyc" -o -name "*.pyo" |xargs rm -f
# remove *.pyc and *.pyo files if any
find ${tgtpath} -type f -name "*.pyc" -o -name "*.pyo" |xargs rm -f
# copy or create INSTALL
if [ -e ${STAGING}/INSTALL ]; then
cp ${STAGING}/INSTALL ${tgtpath}
else
cat <<INSTALL_EOF >${tgtpath}/INSTALL
# copy or create INSTALL
if [ -e ${STAGING}/INSTALL ]; then
cp ${STAGING}/INSTALL ${tgtpath}
else
cat <<INSTALL_EOF >${tgtpath}/INSTALL
Full build documentation for SpiderMonkey is hosted on MDN:
https://developer.mozilla.org/en-US/docs/SpiderMonkey/Build_Documentation
@ -170,13 +170,13 @@ Building with default options may be performed as follows:
../configure
make # or mozmake on Windows
INSTALL_EOF
fi
fi
# copy or create README
if [ -e ${STAGING}/README ]; then
cp ${STAGING}/README ${tgtpath}
else
cat <<README_EOF >${tgtpath}/README
# copy or create README
if [ -e ${STAGING}/README ]; then
cp ${STAGING}/README ${tgtpath}
else
cat <<README_EOF >${tgtpath}/README
This directory contains SpiderMonkey ${MOZJS_MAJOR_VERSION}.
This release is based on a revision of Mozilla ${MOZJS_MAJOR_VERSION}:
@ -186,27 +186,27 @@ The changes in the patches/ directory were applied.
MDN hosts the latest SpiderMonkey ${MOZJS_MAJOR_VERSION} release notes:
https://developer.mozilla.org/en-US/docs/SpiderMonkey/${MOZJS_MAJOR_VERSION}
README_EOF
fi
fi
# copy LICENSE
if [ -e ${TOPSRCDIR}/b2g/LICENSE ]; then
cp ${TOPSRCDIR}/b2g/LICENSE ${tgtpath}/
else
cp ${TOPSRCDIR}/LICENSE ${tgtpath}/
fi
# copy LICENSE
if [ -e ${TOPSRCDIR}/b2g/LICENSE ]; then
cp ${TOPSRCDIR}/b2g/LICENSE ${tgtpath}/
else
cp ${TOPSRCDIR}/LICENSE ${tgtpath}/
fi
# copy patches dir, if it currently exists in STAGING
if [ -d ${STAGING}/patches ]; then
cp -pPR ${STAGING}/patches ${tgtpath}
elif [ -d ${TOPSRCDIR}/patches ]; then
cp -pPR ${TOPSRCDIR}/patches ${tgtpath}
fi
# copy patches dir, if it currently exists in STAGING
if [ -d ${STAGING}/patches ]; then
cp -pPR ${STAGING}/patches ${tgtpath}
elif [ -d ${TOPSRCDIR}/patches ]; then
cp -pPR ${TOPSRCDIR}/patches ${tgtpath}
fi
# Roll the tarball
echo "Packaging source tarball at ${pkgpath}..."
${TAR} $taropts ${pkgpath} -C ${STAGING} ${version}
;;
# Roll the tarball
echo "Packaging source tarball at ${pkgpath}..."
${TAR} $taropts ${pkgpath} -C ${STAGING} ${version}
;;
*)
echo "Unrecognized command: $cmd"
;;
echo "Unrecognized command: $cmd"
;;
esac