summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2017-03-22 21:36:59 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-03-22 21:36:59 +0000
commit97a4145b3682577ce15c83992edcfeb48a3d6b70 (patch)
tree5f88184ba8a9938790b7b83d03ffc4911eeab4aa
parent49cb2125a9766032e57b8dde4fa09f90d12d44f1 (diff)
parent98a61f0647f828052d3af735180c11b26c746bdc (diff)
downloaddevice_common-97a4145b3682577ce15c83992edcfeb48a3d6b70.tar.gz
device_common-97a4145b3682577ce15c83992edcfeb48a3d6b70.tar.bz2
device_common-97a4145b3682577ce15c83992edcfeb48a3d6b70.zip
Allow injecting a script to do additional pre-package processing.
am: 98a61f0647 Change-Id: I8763f361707d6abd08961b455345fd60f590dd77
-rwxr-xr-xgenerate-packages.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/generate-packages.sh b/generate-packages.sh
index d24f75e..473cef1 100755
--- a/generate-packages.sh
+++ b/generate-packages.sh
@@ -14,9 +14,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-if [ $# != 6 ]
+if [ $# -lt 6 -o $# -gt 7 ]
then
- echo Usage: $0 BUILD_ID BUILD ROOTDEVICE DEVICE MANUFACTURER PRODUCT
+ echo Usage: $0 BUILD_ID BUILD ROOTDEVICE DEVICE MANUFACTURER PRODUCT [PATCHSCRIPT]
echo Example: $0 1075408 KOT49Y mako mako lge occam
fi
@@ -28,6 +28,7 @@ BUILD=$2
ROOTDEVICE=$3
DEVICE=$4
MANUFACTURER=$5
+PATCHSCRIPT=$7
cd ../$MANUFACTURER/$ROOTDEVICE/self-extractors || echo Error change dir
@@ -144,6 +145,10 @@ do
mv ${FILEDIR_ROOT}/device-vendor-sailfish.mk ${FILEDIR_ROOT_SHARE}
fi
+ if [ -n ${PATCHSCRIPT} ]; then
+ ${PATCHSCRIPT}
+ fi
+
echo \ \ Generating self-extracting script
SCRIPT=extract-$COMPANY-$DEVICE.sh
cat PROLOGUE > tmp/$SCRIPT || echo \ \ \ \ Error generating script