diff --git a/Makefile.am b/Makefile.am index 1fea897ab..6d7c3dcb1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -28,9 +28,7 @@ EXTRA_DIST = \ 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 \ diff --git a/configure.ac b/configure.ac index 0ed127859..2805b5955 100644 --- a/configure.ac +++ b/configure.ac @@ -176,8 +176,8 @@ AC_CONFIG_FILES([ 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 diff --git a/scripts/gajim-history-manager.in b/scripts/gajim-history-manager.in deleted file mode 100644 index 0d73e4926..000000000 --- a/scripts/gajim-history-manager.in +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -## scripts/gajim-history-manager.in -## -## Copyright (C) 2009 Yann Le Boulanger -## -## 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 . -## - -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 $@ diff --git a/scripts/gajim-remote.in b/scripts/gajim-remote.in deleted file mode 100644 index d9e994dd2..000000000 --- a/scripts/gajim-remote.in +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -## scripts/gajim-remote.in -## -## Copyright (C) 2006 Yann Leboulanger -## Copyright (C) 2008 Jonathan Schleifer -## -## 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 . -## - -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 "$@" diff --git a/scripts/gajim.in b/scripts/gajim.in index 7648aff04..7a8322ff4 100644 --- a/scripts/gajim.in +++ b/scripts/gajim.in @@ -21,14 +21,17 @@ ## along with Gajim. If not, see . ## +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 $@