From 4e4341588387576c67929f4fdd3a7ed4b71e9a17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Schneider?= Date: Thu, 13 Feb 2014 18:03:16 +0100 Subject: [PATCH] python version: update Makefile to install python --- Makefile | 3 ++- eobuilder.sh | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100755 eobuilder.sh diff --git a/Makefile b/Makefile index 72828e5..1c5685e 100644 --- a/Makefile +++ b/Makefile @@ -5,10 +5,11 @@ all: install install: apt-get install pbuilder devscripts debhelper cowbuilder git dput fakeroot sudo if ! getent passwd eobuilder > /dev/null 2>&1; then useradd eobuilder --home-dir /var/lib/eobuilder --create-home; fi + python setup.py install su eobuilder -p -c "cp pbuilderrc /var/lib/eobuilder/.pbuilderrc" su eobuilder -p -c "cp dput.cf /var/lib/eobuilder/.dput.cf" su eobuilder -p -c "cp gitconfig /var/lib/eobuilder/.gitconfig" - cp eobuilder /usr/local/bin + cp eobuilder.sh /usr/local/bin cp eobuilder.cron /etc/cron.daily/eobuilder uninstall: diff --git a/eobuilder.sh b/eobuilder.sh new file mode 100755 index 0000000..1dddf15 --- /dev/null +++ b/eobuilder.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +if [ "$(whoami)" != "eobuilder" ]; then + if which sudo; then + if sudo -v -u eobuilder; then + sudo -u eobuilder eobuilder "$@" + exit $? + fi + echo "You must run this script with eobuilder user" + exit 1 + fi +fi + +eobuilder-ctl $*