]>
git.wh0rd.org - chrome-ext/waterfall-buildbot-clicker.git/blob - makedist.sh
9ecf0bf70d0bffcd179b59e421d08a24f788ce13
2 # Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
10 echo "Usage: $0 [rev]"
16 if [[ $# -gt 1 ||
-n ${1//[0-9]} ]] ; then
18 Usage: makedist.sh <rev>
20 The ver will be taken from manifest.json.
22 The rev should be an integer.
26 This will generate a manifest for version 3.0.1 (when version is '3.0'
27 in the manifest.json file)
35 -e '/^[[:space:]]*"'"${key}"'"/s|.*:[[:space:]]*"([^"]*)",?$|\1|p' \
39 PN
=$
(json_value name |
sed 's:[[:space:]/]:_:g' |
tr '[:upper:]' '[:lower:]')
40 if [[ ${PN} == "__msg_name__" ]] ; then
41 PN
=$
(basename "$(pwd)")
43 PV
=$
(json_value version
)
51 [[ ${line} == */* ]] && mkdir -p "${P}/${line%/*}"
52 ln "${line}" "${P}/${line}"
53 done < <(sed 's:#.*::' manifest.files)
54 cp Makefile manifest.files manifest.json "${P}/"
58 mv -v "${line}" "${line%.min}"
59 done < <(find "${P}" -name '*.min')
60 rm "${P}"/{manifest.files,Makefile}
63 -e '/"version
"/s:"[^
"]*",:"'${PVR}'",:' \
68 zip -r "${zip}" "${P}"