[packages/apache-mod_pagespeed/dev-1.8: 8/11] move clean source to separate script
glen
glen at pld-linux.org
Tue Jan 27 17:31:17 CET 2015
commit 81c4dc240418fa0b8f23318154007ac729195195
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Tue Dec 16 23:01:19 2014 +0200
move clean source to separate script
clean-source.sh | 29 +++++++++++++++++++++++++++++
get-source.sh | 27 ++-------------------------
2 files changed, 31 insertions(+), 25 deletions(-)
---
diff --git a/clean-source.sh b/clean-source.sh
new file mode 100755
index 0000000..4a111d4
--- /dev/null
+++ b/clean-source.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+set -xe
+
+# There are directories we want to strip, but that are unnecessarily required by the build-system
+# So we drop everything but the gyp/gypi files
+almost_strip_dirs() {
+ for dir in "$@"; do
+ find $dir -depth -mindepth 1 '!' '(' -name '*.gyp' -o -name '*.gypi' ')' -print -delete || :
+ done
+}
+
+export LC_ALL=C
+
+# clean sources, but preserve .gyp, .gypi
+almost_strip_dirs \
+ third_party/apr/ \
+ third_party/httpd/ \
+ third_party/httpd24/ \
+ third_party/instaweb/ \
+ third_party/openssl/ \
+
+# some more unneeded files for build
+rm -r third_party/chromium/src/net
+rm -r third_party/chromium/src/chrome
+rm -r net/instaweb/rewriter/testdata
+
+# build/linux and third_party/chromium/src/build/linux are same dirs, the latter is not usedc
+#rm -r third_party/chromium/src/build/linux
+#third_party/chromium/src/build/linux
diff --git a/get-source.sh b/get-source.sh
index b5676ab..c3e683f 100755
--- a/get-source.sh
+++ b/get-source.sh
@@ -13,18 +13,10 @@ version=
spec=apache-mod_pagespeed.spec
force=0
-# There are directories we want to strip, but that are unnecessarily required by the build-system
-# So we drop everything but the gyp/gypi files
-almost_strip_dirs() {
- for dir in "$@"; do
- find $dir -depth -mindepth 1 '!' '(' -name '*.gyp' -o -name '*.gypi' ')' -print -delete || :
- done
-}
-
# abort on errors
set -e
# work in package dir
-dir=$(dirname "$0")
+dir=$(readlink -f $(dirname "$0"))
cd "$dir"
if [[ "$1" = *force ]]; then
@@ -97,22 +89,7 @@ $gclient sync --nohooks -v
cd src
-# clean sources, but preserve .gyp, .gypi
-almost_strip_dirs \
- third_party/apr/ \
- third_party/httpd/ \
- third_party/httpd24/ \
- third_party/instaweb/ \
- third_party/openssl/ \
-
-# some more unneeded files for build
-rm -r third_party/chromium/src/net
-rm -r third_party/chromium/src/chrome
-rm -r net/instaweb/rewriter/testdata
-
-# build/linux and third_party/chromium/src/build/linux are same dirs, the latter is not usedc
-#rm -r third_party/chromium/src/build/linux
-#third_party/chromium/src/build/linux
+sh -x $dir/clean-source.sh
# Populate the LASTCHANGE file template as we will not include VCS info in tarball
./build/lastchange.sh . -o LASTCHANGE.in
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/apache-mod_pagespeed.git/commitdiff/a16986b10ae569ebade10e6ef3967d3663786ec1
More information about the pld-cvs-commit
mailing list