]>
git.wh0rd.org - chrome-ext/web-power-switch.git/blob - makedist.sh
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.
17 path, key = sys.argv[1:]
18 with open(path) as fp:
21 ' "manifest.json" "${key}"
24 PN
=$
(json_value name |
sed 's:[[:space:]/]:_:g' |
tr '[:upper:]' '[:lower:]')
25 if [[ ${PN} == "__msg_name__" ]] ; then
26 PN
=$
(basename "$(pwd)")
28 PV
=$
(json_value version
)
37 [[ ${line} == */* ]] && mkdir -p "${P}/${line%/*}"
38 ln "${line}" "${P}/${line}"
39 done < <(sed 's:#.*::' manifest.files)
40 cp Makefile manifest.files manifest.json "${P}/"
42 make -C "${P}" -j {css,js}-min
44 mv "${line}" "${line%.min}"
45 done < <(find "${P}" -name '*.min')
46 rm "${P}"/{manifest.files,Makefile}
50 path, ver = sys.argv[1:]
51 with open(path) as fp:
55 with open(path, "w
") as fp:
56 json.dump(data, fp, separators=(",", ":"))
57 ' "${P}/manifest.json
" "${PVR}"
61 zip -r "${zip}" "${P}"