All pastes #755628 Raw Edit

Untitled

public text v1 · immutable
#755628 ·published 2007-10-30 20:21 UTC
rendered paste body
  #Needed to Indent Dependencies
  LEFTOFFSET="17"
  TTYWIDTH="$(stty size | awk '{print $2}')"
  LINECHARSMAX="$((TTYWIDTH-LEFTOFFSET))"

  charsonthisline=0
  if [ -n "$depends" ]; then
    echo -n "Depends On     : "
    for dep in $depends; do
      deplength="${#dep}"
      charsonthisline="$((charsonthisline+deplength+1))"
      if [ "$charsonthisline" -le "$LINECHARSMAX" ]; then
        echo -n "$dep "
      else
        echo
        echo -n "                 $dep "
        charsonthisline=0
      fi
    done
  else
    echo "Depends On        : "
  fi