Author: asterix Date: 2009-02-17 13:29:54 +0100 (Tue, 17 Feb 2009) New Revision: 11116
Removed: trunk/scripts/gajim-history-manager.in trunk/scripts/gajim-remote.in Modified: trunk/Makefile.am trunk/configure.ac trunk/scripts/gajim.in Log: [brubru] Factorize lauchers. Fixes #4819
Modified: trunk/Makefile.am =================================================================== --- trunk/Makefile.am 2009-02-17 12:15:25 UTC (rev 11115) +++ trunk/Makefile.am 2009-02-17 12:29:54 UTC (rev 11116) @@ -28,9 +28,7 @@ intltool-update.in \ gajim.nsi \ setup_win32.py \ - scripts/gajim.in \ - scripts/gajim-remote.in \ - scripts/gajim-history-manager.in + scripts/gajim.in DISTCLEANFILES = \ intltool-extract \
Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2009-02-17 12:15:25 UTC (rev 11115) +++ trunk/configure.ac 2009-02-17 12:29:54 UTC (rev 11116) @@ -176,8 +176,8 @@ src/osx/growl/Makefile src/osx/syncmenu/Makefile scripts/gajim - scripts/gajim-remote - scripts/gajim-history-manager + scripts/gajim-remote:scripts/gajim.in + scripts/gajim-history-manager:scripts/gajim.in po/Makefile.in ]) AC_OUTPUT
Deleted: trunk/scripts/gajim-history-manager.in =================================================================== --- trunk/scripts/gajim-history-manager.in 2009-02-17 12:15:25 UTC (rev 11115) +++ trunk/scripts/gajim-history-manager.in 2009-02-17 12:29:54 UTC (rev 11116) @@ -1,31 +0,0 @@ -#!/bin/sh -## scripts/gajim-history-manager.in -## -## Copyright (C) 2009 Yann Le Boulanger <asterix AT lagaule.org> -## -## This file is part of Gajim. -## -## Gajim is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published -## by the Free Software Foundation; version 3 only. -## -## Gajim is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Gajim. If not, see http://www.gnu.org/licenses/. -## - -if test $(id -u) -eq 0; then - echo "You must not launch Gajim as root, it is INSECURE" - exit 1 -fi - -export datadir=@DATADIR@/gajim -PYTHON_EXEC=@PYTHON@ - -cd ${datadir}/src -export PYTHONPATH="$PYTHONPATH:@LIBDIR@/gajim" -exec ${PYTHON_EXEC} -OO history_manager.py $@
Deleted: trunk/scripts/gajim-remote.in =================================================================== --- trunk/scripts/gajim-remote.in 2009-02-17 12:15:25 UTC (rev 11115) +++ trunk/scripts/gajim-remote.in 2009-02-17 12:29:54 UTC (rev 11116) @@ -1,32 +0,0 @@ -#!/bin/sh -## scripts/gajim-remote.in -## -## Copyright (C) 2006 Yann Leboulanger <asterix AT lagaule.org> -## Copyright (C) 2008 Jonathan Schleifer <js-gajim AT webkeks.org> -## -## This file is part of Gajim. -## -## Gajim is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published -## by the Free Software Foundation; version 3 only. -## -## Gajim is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with Gajim. If not, see http://www.gnu.org/licenses/. -## - -if test $(id -u) -eq 0; then - echo "You must not launch gajim-remote as root, it is INSECURE" - exit 1 -fi - -export datadir=@DATADIR@/gajim -PYTHON_EXEC=@PYTHON@ - -cd ${datadir}/src -export PYTHONPATH="$PYTHONPATH:@LIBDIR@/gajim" -exec ${PYTHON_EXEC} -OO gajim-remote.py "$@"
Modified: trunk/scripts/gajim.in =================================================================== --- trunk/scripts/gajim.in 2009-02-17 12:15:25 UTC (rev 11115) +++ trunk/scripts/gajim.in 2009-02-17 12:29:54 UTC (rev 11116) @@ -21,14 +21,17 @@ ## along with Gajim. If not, see http://www.gnu.org/licenses/. ##
+APP=`basename $0` if test $(id -u) -eq 0; then - echo "You must not launch Gajim as root, it is INSECURE" + echo "You must not launch $APP as root, it is INSECURE" exit 1 fi
+[ "$APP" = "gajim-history-manager" ] && APP="history_manager" + export datadir=@DATADIR@/gajim PYTHON_EXEC=@PYTHON@
cd ${datadir}/src export PYTHONPATH="$PYTHONPATH:@LIBDIR@/gajim" -exec ${PYTHON_EXEC} -OO gajim.py $@ +exec ${PYTHON_EXEC} -OO $APP.py $@