All pastes #565711 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-06-14 03:23 UTC
rendered paste body
# IN tovid-demo
# ========================================================================
# Basic set-up/checks
# check there is not 2 versions of tovid installed
echo "checking for installed version"
ERROR=$(PATH=$(pwd)/$BIN:$PATH todisc)
[[  $? = 66 ]] && echo "$ERROR" && exit 1

# IN tovid-init
# Exit when there is more than one tovid installed
if test $NUM_INSTALLED -ne 1; then
    echo "Found $NUM_INSTALLED versions of tovid on your system!"
    echo "I won't run until there is only one of me :)"
    echo "Installed versions:"
    i=1
    while test $i -le $(echo "$INSTALLED_TOVIDS" | awk '{print NF}'); do
        tovid_ver=$(echo $INSTALLED_VERS | awk '{print $'$i'}')
        tovid_path=$(echo $INSTALLED_TOVIDS | awk '{print $'$i'}')
        printf "   %s (%s)\n" $tovid_ver $tovid_path
        let "i=i+1"
    done
    echo "Exiting..."
    exit 66
fi