quvi/const: Add quvi-object http cookie options
[libquvi-scripts.git] / stamp.sh
blobde631b4cbe54bb336ee38b4d17b1cd01dd9b194e
1 #!/bin/sh
3 # libquvi-scripts
4 # Copyright (C) 2012 Toni Gundogdu <legatvs@gmail.com>
6 # This file part of libquvi-scripts <http://quvi.sourceforge.net/>.
8 # This program is free software: you can redistribute it and/or
9 # modify it under the terms of the GNU Affero General Public
10 # License as published by the Free Software Foundation, either
11 # version 3 of the License, or (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU Affero General Public License for more details.
18 # You should have received a copy of the GNU Affero General
19 # Public License along with this program. If not, see
20 # <http://www.gnu.org/licenses/>.
22 top_distdir=$2
23 VN=$1
25 help()
27 echo "Usage: $0 <version> <top_distdir>"
28 exit 1
31 stamp_scripts()
33 [ -z "$VN" ] && {
34 echo error: define version string
35 help
37 [ -z "$top_distdir" ] && {
38 echo error: define path to top dist dir
39 help
41 [ -x "$top_distdir/gen-ver.sh" ] && {
42 echo "Stamp lua scripts..."
43 D='common/ media/ playlist/ scan/ subtitle/ subtitle/export/ util/'
44 for d in $D; do
45 find "$top_distdir/share/$d" -name '*.lua' \
46 -exec echo "Stamp {}" \; \
47 -exec sed -i "s/^\(-- libquvi-scripts\).*/\1 $VN/" {} \;
48 done
50 exit 0
53 stamp_scripts