tinycm rev 46

Add a tiny tool to update a TinyCM install
author Christophe Lincoln <pankso@slitaz.org>
date Sun Jan 19 02:20:22 2014 +0100 (2014-01-19)
parents 53a267833266
children aff0e20fbd3e
files tools/update.sh
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tools/update.sh	Sun Jan 19 02:20:22 2014 +0100
     1.3 @@ -0,0 +1,21 @@
     1.4 +#!/bin/sh
     1.5 +#
     1.6 +# Update a TinyCM install with latest code from Hg
     1.7 +# Usage: ./tools/update.sh [paths]
     1.8 +#
     1.9 +. /lib/libtaz.sh
    1.10 +
    1.11 +[ ! "$1" ] && echo "Missing TinyCM path(s)" && exit 0
    1.12 +
    1.13 +# We dont overwrite style.css and images since they ma have change
    1.14 +# as well as the config file!
    1.15 +for cm in $@
    1.16 +do
    1.17 +	echo "Updating: $cm"
    1.18 +	cp -a index.cgi ${cm}
    1.19 +	cp -a plugins ${cm}
    1.20 +	cp -a lib/functions.js ${cm}/lib
    1.21 +	cp -a lib/jseditor.html ${cm}/lib
    1.22 +done
    1.23 +
    1.24 +exit 0