From f0692ba7d7e871cd36a69e2bb8a0f236db0df3f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frederik=20=E2=80=9CFreso=E2=80=9D=20S=2E=20Olesen?= Date: Fri, 28 Apr 2017 22:55:24 +0200 Subject: [PATCH] Remove "misc/whipper-uninstalled" A script that sets up an environment for running whipper without actually installing it. With the clean ups that have happened to whipper as well as later developments in the Python eco system, simply setting up a virtualenv and running whipper from within that seems like a more reasonable approach at this time. This also fixes https://github.com/JoeLametta/whipper/issues/47 by removing the "morituri-uninstalled mode" completely. :) --- misc/whipper-uninstalled | 83 ---------------------------------------- 1 file changed, 83 deletions(-) delete mode 100755 misc/whipper-uninstalled diff --git a/misc/whipper-uninstalled b/misc/whipper-uninstalled deleted file mode 100755 index 050d7df..0000000 --- a/misc/whipper-uninstalled +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/bash -i -# -# set up environment to use and develop uninstalled -# -# set up PATH, PYTHONPATH -# -# prefer uninstalled versions, but also put installed ones on the path -# -# symlink this script in a directory in your path (for example $HOME/bin) -# to a name that reflects the version of your checkout - -# this script is run -i so that PS1 doesn't get cleared - -self=$0 -absolute=$self -if test -L $absolute -then - # find what the symlink points to - absolute=`stat $absolute -c %N -t | sed 's/^.* -> .//g' | sed 's/.$//g'` -fi -MISCDIR=`dirname $absolute` -BASEDIR=`cd $MISCDIR/.. && pwd` - -# extract version from $0 -# if this script is called "...-head" then version will be "head" -PROJECT=`basename $self | sed s/-.*//g` -VERSION=`basename $self | sed s/.*-//g` -COMMAND=$PROJECT -# override if the command line name to be completed is different -COMMAND=whipper - -options= - -# set up a bunch of paths -export PATH=$BASEDIR/bin${PATH:+:$PATH} -export PYTHONPATH=$BASEDIR${PYTHONPATH:+:$PYTHONPATH} - -# set up bash completion if we have it -tmp= -if echo $SHELL | grep bash > /dev/null -then - if test -d $BASEDIR/etc/bash_completion.d - then - # we need to create our own temporary bashrc replacement from the user's - # and our completion stuff - tmp=`mktemp -t bashrc.XXXXXXXX` - if test -e $HOME/.bashrc - then - cat $HOME/.bashrc > $tmp - fi - cat $BASEDIR/etc/bash_completion.d/$COMMAND >> $tmp - SHELL_OPTIONS="--init-file $tmp" - options="(with bash completion)" - fi -fi - -# if we got a command, run it, else start a shell -if test ! -z "$1"; -then - $@ - exit $? -fi - -# set up prompt to help us remember we're in a subshell, cd to -# the base directory and start $SHELL -cd $BASEDIR -shell=$SHELL -if test "x$SHELL" == "x/bin/bash" -then - # debian/ubuntu resets our PS1. bastards. - if test -e /etc/debian_version - then - SHELL_OPTIONS="$SHELL_OPTIONS --noprofile" - fi -fi -echo Entering interactive $PROJECT shell $SHELL $options -PS1="[$PROJECT-$VERSION] $PS1" $SHELL $SHELL_OPTIONS - -if test ! -z "$tmp" -then - rm $tmp -fi -echo Thank you for using $PROJECT.