diff options
author | Andreas Mair <amair.sob@googlemail.com> | 2006-07-07 11:43:39 +0200 |
---|---|---|
committer | Andreas Mair <amair.sob@googlemail.com> | 2006-07-07 11:43:39 +0200 |
commit | f04236038448cce41ff2af10e2d0ccfcd8df378a (patch) | |
tree | 33979f482e9c11cf86a0ba10c3d0ed47a1e3d1a4 /make.sh | |
parent | ada389d94b34bfef75be700a6cb4e3f05ee102ff (diff) | |
download | vdradmin-am-3.4.6rc.tar.gz vdradmin-am-3.4.6rc.tar.bz2 |
2006-07-07: 3.4.6rcv3.4.6rc
- Replaced: Makefiles by make.sh (run "./make.sh" for usage information").
- Removed: LinVDR logo.
- Changed: colors in timeline.
- Fixed: layout problems in prog_summary detail view (Reported by Sven Soltau).
- Fixed: moving forward/backward at the end/start of a month (Reported by foobar42).
Diffstat (limited to 'make.sh')
-rwxr-xr-x | make.sh | 97 |
1 files changed, 97 insertions, 0 deletions
@@ -0,0 +1,97 @@ +#!/bin/bash + +LANGS="de es fr fi nl ru" +DIST_FILES="COPYING CREDITS FAQ HISTORY INSTALL README README.translators REQUIREMENTS contrib convert.pl install.sh lib locale make.sh template uninstall.sh vdradmind.pl vdradmind.pl.1" +INSTALL_SH=./install.sh +TMPDIR=/tmp + +#TODO: +# - dist / distclean / clean + +function Usage() +{ + echo "Usage: $0 cvs" + echo " cvs - always use this after a \"cvs update \" or \"cvs checkout\"" + echo " install - install VDRAdmin-AM" + echo " uninstall - uninstall VDRAdmin-AM" + echo " po - convert .po files to .mo files" + echo " dist - create distribution archive" + exit 1 +} + +function Error() +{ + [ "$1" ] && echo $* + exit 1 +} + +function do_po() +{ + for L in $LANGS + do + [ -d locale/$L/LC_MESSAGES/ ] || mkdir -p locale/$L/LC_MESSAGES/ + msgfmt po/$L.po -o po/$L.mo + install -m 644 po/$L.mo locale/$L/LC_MESSAGES/vdradmin.mo + done +} + +function do_cvs() +{ + # Create missing symbolic links + [ -e uninstall.sh ] || ln -s install.sh uninstall.sh + [ -e README ] || ln -s INSTALL README +} + +function getVersion() +{ + grep "^my \$VERSION" vdradmind.pl | sed -e 's/^[^\"]*\"\([^\"]*\)\".*$/\1/' +} + +function do_dist() +{ + local DIST_NAME=vdradmin-am-$(getVersion) + mkdir -p $TMPDIR/$DIST_NAME + cp -a $DIST_FILES $TMPDIR/$DIST_NAME + mkdir -p $TMPDIR/$DIST_NAME/po + cp -a po/*.po po/*.pot $TMPDIR/$DIST_NAME/po + ( + cd $TMPDIR + tar --exclude CVS -cjf $DIST_NAME.tar.bz2 $DIST_NAME + rm -rf $TMPDIR/$DIST_NAME + ) + mv $TMPDIR/$DIST_NAME.tar.bz2 . +} + +[ "$1" ] || Usage +[ -x $INSTALL_SH ] || Error "$INSTALL_SH not found!" + +while [ $1 ] +do + case $1 in + cvs) + do_cvs + ;; + + install) + $INSTALL_SH -c + ;; + + uninstall) + $INSTALL_SH -u + ;; + + po) + do_po + ;; + + dist) + do_dist + ;; + + *) + Error "Unknown command \"$1\"" + ;; + esac + shift +done + |