---
name: bogosort
version: 0.4.2_1
origin: misc/bogosort
comment: Sort (or not) stdin using the bogo-sort algorithm
arch: freebsd:9:x86:64
www: http://www.lysator.liu.se/~qha/bogosort/
maintainer: eadler@FreeBSD.org
prefix: /usr/local
licenselogic: single
flatsize: 42352
desc: "Sort files or its standard input using the bogo-sort algorithm\ndescribed in
  the Jargon File <http://www.catb.org/~esr/jargon/>.\n\nA quote from the Jargon File
  'bogo-sort' entry:\n\n     ...The archetypical perversely awful algorithm (as opposed
  to\n     _bubble sort_, which is merely the generic bad algorithm).\n     _Bogo-sort_
  is equivalent to repeatedly throwing a deck of cards\n     in the air, picking them
  up at random, and then testing whether\n     they are in order. It serves as a sort
  of canonical example of\n     awfulness. Looking at a program and seeing a dumb
  algorithm, one\n     might say \"Oh, I see, this program uses _bogo-sort_.\" Esp.\n
  \    appropriate for algorithms with factorial or super-exponential\n     running
  time in the average case and probabilistically infinite\n     worst-case running
  time. Compare _bogus_, _brute force_,\n     _lasherism_...\n\nAuthor: Ulrik Haugen
  <qha@lysator.liu.se>\nWWW:\thttp://www.lysator.liu.se/~qha/bogosort/\n"
categories: [misc]
files:
  /usr/local/bin/bogosort: 494e2526891c8c456d946899948948e999a2020c6d63cb4f5b846b0d33c383b3
  /usr/local/info/bogosort.info: f5dd764354303197bc1928937ce8fd129cd78f9fdb8bf21b63cf482c060e7dc6
  /usr/local/man/man1/bogosort.1.gz: 52a87908b804dcd90e78ddfc2dfc3b89ef7bcef4d8c2ed7e3b96db11b87c3bb5
scripts:
  post-install: |
    file=/usr/local/info/bogosort.info
    install-info --quiet /usr/local/info/bogosort.info ${file%25/*}/dir
  pre-deinstall: |
    if [ -f /usr/local/info/dir ]; then if sed -e '1,/Menu:/d' /usr/local/info/dir | grep -q '^[*] '; then true; else rm /usr/local/info/dir; fi; fi
  post-deinstall: |
    file=/usr/local/info/bogosort.info
    install-info --quiet --delete /usr/local/info/bogosort.info ${file%25/*}/dir
    if [ $(info -d ${file%25/*}  --output - 2>/dev/null | grep -c '^*') -eq 1 ]; then
      rm -f ${file%25/*}/dir
    fi
