# encoding: ascii
# api: bash
# title: directories tree
# description: If ‘tree’ pocket has not been installed that you can use next script but note that it gets only directories.
# version: 0.1
# author: greg zakharov
# license: CC0
# x-poshcode-id: 4561
# x-archived: 2013-11-04T14:33:37
# x-published: 2013-10-26T16:39:00
#
#
#!/bin/bash

if [ -z "$1" ]; then loc=$(pwd); else loc=$1; fi
ls -aR $loc | grep ':$' | sed -e 's/:$//;s/[^-][^\/]*\//--/g;s/^/ /;s/-/|/'
