Rewrite Arte.choose_best as Arte.ch_best
[libquvi-scripts.git] / stamp.sh
blobe5476d765d265d89cb85f0051e47325d8d49b3ef
1 #!/bin/sh
2 # stamp.sh for libquvi-scripts
3 # - stamps the lua scripts to match the version
5 stamp_scripts()
7 [ -z $1 ] && (echo "error: define path to top source dir" ; exit 1)
8 [ -z $2 ] && (echo "error: define path to top dist dir" ; exit 1)
9 if [ -x "$2/gen-ver.sh" ]; then
10 D='common/ media/ playlist/ scan/ util/'
11 VN=`$2/gen-ver.sh $1`
12 for d in $D; do
13 find "$2/share/lua/$d" -name '*.lua' \
14 -exec echo "Stamp {}" \; \
15 -exec sed -i "s/^\(-- libquvi-scripts\).*/\1 $VN/" {} \;
16 done
18 exit 0
21 help()
23 echo "Usage: $0 [-h] [top_srcdir]
24 -h Show this help and exit"
25 exit 0
28 while [ $# -gt 0 ]
30 case "$1" in
31 -h) help;;
32 *) break;;
33 esac
34 shift
35 done
37 echo "Find and stamp lua scripts..."
38 stamp_scripts $1 $2