From c91d5b2371b7f55680f600a0e376e6f0bc99ea49 Mon Sep 17 00:00:00 2001 From: Michael Stone Date: Sun, 19 Dec 2010 00:44:23 +0000 Subject: Merge branches 'ms/sh2py' and 'bp/home' into pu * ms/sh2py: Use cgitb for verbose tracebacks. rainbow-{easy,resume}: whitelist TERM Replace shell scripts with python scripts. Format the rainbow-resume command for easy reading. * bp/home: inject: set $HOME --- diff --git a/bin/rainbow-easy b/bin/rainbow-easy index cdcef8d..9955007 100755 --- a/bin/rainbow-easy +++ b/bin/rainbow-easy @@ -1,45 +1,50 @@ -#!/bin/bash +#!/usr/bin/python -function usage() { - echo "sudo $0 ID /path/to/program" - echo "ex: sudo $0 banking /bin/bash" - exit 1 -} - -if [ -z "$1" ] || [ -z "$SUDO_USER" ]; then usage || exit 1; fi - -ID="$1"; shift - -read_parent_envvar () { -python <