Date: Mon, 24 Dec 2001 08:53:18 -0500 (EST) From: Alan Eldridge <ports@geeksrus.net> To: FreeBSD-gnats-submit@freebsd.org Subject: ports/33145: new port sysutils/tree: display tree-view of dirs Message-ID: <200112241353.fBODrI803148@wwweasel.geeksrus.net>
next in thread | raw e-mail | index | archive | help
>Number: 33145 >Category: ports >Synopsis: new port sysutils/tree: display tree-view of dirs >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Dec 24 06:00:02 PST 2001 >Closed-Date: >Last-Modified: >Originator: Alan Eldridge >Release: FreeBSD 4.4-STABLE i386 >Organization: Geeksrus.NET >Environment: System: FreeBSD wwweasel.geeksrus.net 4.4-STABLE FreeBSD 4.4-STABLE #0: Sun Dec 2 19:14:12 EST 2001 root@wwweasel.geeksrus.net:/usr/obj/usr/src/sys/WWWEASEL i386 >Description: Tree displays a tree view of dirs and files. It's a Linux utility that is useful enough to have. Tree is licensed under the Artistic License (like Perl). >How-To-Repeat: >Fix: #!/bin/sh # This is a shell archive (produced by GNU sharutils 4.2.1). # To extract the files from this archive, save it to some FILE, remove # everything before the `!/bin/sh' line above, then type `sh FILE'. # # Made on 2001-12-24 08:47 EST by <alane@wwweasel.geeksrus.net>. # Source directory was `/home/alane/FreeBSD/local/ports/sysutils'. # # Existing files will *not* be overwritten unless `-c' is specified. # # This shar contains: # length mode name # ------ ---------- ------------------------------------------ # 337 (null) -rw-r--r-- # 267 (null) -rw-r--r-- # 70 (null) -rw-r--r-- # 9 (null) -rw-r--r-- # 54 (null) -rw-r--r-- # 614 (null) -rw-r--r-- # 1063 (null) -rw-r--r-- # save_IFS="${IFS}" IFS="${IFS}:" gettext_dir=FAILED locale_dir=FAILED first_param="$1" for dir in $PATH do if test "$gettext_dir" = FAILED && test -f $dir/gettext \ && ($dir/gettext --version >/dev/null 2>&1) then set `$dir/gettext --version 2>&1` if test "$3" = GNU then gettext_dir=$dir fi fi if test "$locale_dir" = FAILED && test -f $dir/shar \ && ($dir/shar --print-text-domain-dir >/dev/null 2>&1) then locale_dir=`$dir/shar --print-text-domain-dir` fi done IFS="$save_IFS" if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILED then echo=echo else TEXTDOMAINDIR=$locale_dir export TEXTDOMAINDIR TEXTDOMAIN=sharutils export TEXTDOMAIN echo="$gettext_dir/gettext -s" fi if touch -am -t 200112312359.59 $$.touch >/dev/null 2>&1 && test ! -f 200112312359.59 -a -f $$.touch; then shar_touch='touch -am -t $1$2$3$4$5$6.$7 "$8"' elif touch -am 123123592001.59 $$.touch >/dev/null 2>&1 && test ! -f 123123592001.59 -a ! -f 123123592001.5 -a -f $$.touch; then shar_touch='touch -am $3$4$5$6$1$2.$7 "$8"' elif touch -am 1231235901 $$.touch >/dev/null 2>&1 && test ! -f 1231235901 -a -f $$.touch; then shar_touch='touch -am $3$4$5$6$2 "$8"' else shar_touch=: echo $echo 'WARNING: not restoring timestamps. Consider getting and' $echo "installing GNU \`touch', distributed in GNU File Utilities..." echo fi rm -f 200112312359.59 123123592001.59 123123592001.5 1231235901 $$.touch # if mkdir _sh02970; then $echo 'x -' 'creating lock directory' else $echo 'failed to create lock directory' exit 1 fi # ============= tree/Makefile ============== if test ! -d 'tree'; then $echo 'x -' 'creating directory' 'tree' mkdir 'tree' fi if test -f 'tree/Makefile' && test "$first_param" != -c; then $echo 'x -' SKIPPING 'tree/Makefile' '(file already exists)' else $echo 'x -' extracting 'tree/Makefile' '(text)' sed 's/^X//' << 'SHAR_EOF' > 'tree/Makefile' && # ex:ts=8 # # New ports collection makefile for: tree # Date created: 2001/12/24 # Whom: AlanE <ports@geeksrus.net> # # $FreeBSD$ # X PORTNAME= tree PORTVERSION= 1.3 CATEGORIES= sysutils MASTER_SITES= ftp://mama.indstate.edu/linux/tree/ EXTRACT_SUFX= .tgz X MAINTAINER= ports@geeksrus.net X MAN1= tree.1 X X.include <bsd.port.mk> X # #EOF SHAR_EOF (set 20 01 12 24 08 33 34 'tree/Makefile'; eval "$shar_touch") && chmod 0644 'tree/Makefile' || $echo 'restore of' 'tree/Makefile' 'failed' if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \ && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then md5sum -c << SHAR_EOF >/dev/null 2>&1 \ || $echo 'tree/Makefile:' 'MD5 check failed' e7205bf636a13f54298461be29d9f78b tree/Makefile SHAR_EOF else shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'tree/Makefile'`" test 337 -eq "$shar_count" || $echo 'tree/Makefile:' 'original size' '337,' 'current size' "$shar_count!" fi fi # ============= tree/pkg-descr ============== if test -f 'tree/pkg-descr' && test "$first_param" != -c; then $echo 'x -' SKIPPING 'tree/pkg-descr' '(file already exists)' else $echo 'x -' extracting 'tree/pkg-descr' '(text)' sed 's/^X//' << 'SHAR_EOF' > 'tree/pkg-descr' && Tree is a simple utility that displays a tree-view of directories and files. It has options to use ANSI color escape-sequences or ASCII graphic characters, and can also output in HTML format. X Tree was written by Steve Baker for Linux. X -- AlanE ports@geeksrus.net SHAR_EOF (set 20 01 12 24 08 28 28 'tree/pkg-descr'; eval "$shar_touch") && chmod 0644 'tree/pkg-descr' || $echo 'restore of' 'tree/pkg-descr' 'failed' if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \ && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then md5sum -c << SHAR_EOF >/dev/null 2>&1 \ || $echo 'tree/pkg-descr:' 'MD5 check failed' f2aaba7bb53321e0a4dcec225a2f0d1a tree/pkg-descr SHAR_EOF else shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'tree/pkg-descr'`" test 267 -eq "$shar_count" || $echo 'tree/pkg-descr:' 'original size' '267,' 'current size' "$shar_count!" fi fi # ============= tree/pkg-comment ============== if test -f 'tree/pkg-comment' && test "$first_param" != -c; then $echo 'x -' SKIPPING 'tree/pkg-comment' '(file already exists)' else $echo 'x -' extracting 'tree/pkg-comment' '(text)' sed 's/^X//' << 'SHAR_EOF' > 'tree/pkg-comment' && Display a tree-view of directories with optional color or HTML output SHAR_EOF (set 20 01 12 24 08 22 51 'tree/pkg-comment'; eval "$shar_touch") && chmod 0644 'tree/pkg-comment' || $echo 'restore of' 'tree/pkg-comment' 'failed' if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \ && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then md5sum -c << SHAR_EOF >/dev/null 2>&1 \ || $echo 'tree/pkg-comment:' 'MD5 check failed' eb47b599e9868c0930828537e8c91144 tree/pkg-comment SHAR_EOF else shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'tree/pkg-comment'`" test 70 -eq "$shar_count" || $echo 'tree/pkg-comment:' 'original size' '70,' 'current size' "$shar_count!" fi fi # ============= tree/pkg-plist ============== if test -f 'tree/pkg-plist' && test "$first_param" != -c; then $echo 'x -' SKIPPING 'tree/pkg-plist' '(file already exists)' else $echo 'x -' extracting 'tree/pkg-plist' '(text)' sed 's/^X//' << 'SHAR_EOF' > 'tree/pkg-plist' && bin/tree SHAR_EOF (set 20 01 12 24 08 18 19 'tree/pkg-plist'; eval "$shar_touch") && chmod 0644 'tree/pkg-plist' || $echo 'restore of' 'tree/pkg-plist' 'failed' if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \ && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then md5sum -c << SHAR_EOF >/dev/null 2>&1 \ || $echo 'tree/pkg-plist:' 'MD5 check failed' 5dc6ae34eb42a5d6b2f505b6f1b40876 tree/pkg-plist SHAR_EOF else shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'tree/pkg-plist'`" test 9 -eq "$shar_count" || $echo 'tree/pkg-plist:' 'original size' '9,' 'current size' "$shar_count!" fi fi # ============= tree/distinfo ============== if test -f 'tree/distinfo' && test "$first_param" != -c; then $echo 'x -' SKIPPING 'tree/distinfo' '(file already exists)' else $echo 'x -' extracting 'tree/distinfo' '(text)' sed 's/^X//' << 'SHAR_EOF' > 'tree/distinfo' && MD5 (tree-1.3.tgz) = cd595dc2eb53760ce32d978fd52fe93c SHAR_EOF (set 20 01 12 24 07 40 54 'tree/distinfo'; eval "$shar_touch") && chmod 0644 'tree/distinfo' || $echo 'restore of' 'tree/distinfo' 'failed' if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \ && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then md5sum -c << SHAR_EOF >/dev/null 2>&1 \ || $echo 'tree/distinfo:' 'MD5 check failed' 2b2b51e4506e59b73d9b2b17743d19b3 tree/distinfo SHAR_EOF else shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'tree/distinfo'`" test 54 -eq "$shar_count" || $echo 'tree/distinfo:' 'original size' '54,' 'current size' "$shar_count!" fi fi # ============= tree/files/patch-tree.c ============== if test ! -d 'tree/files'; then $echo 'x -' 'creating directory' 'tree/files' mkdir 'tree/files' fi if test -f 'tree/files/patch-tree.c' && test "$first_param" != -c; then $echo 'x -' SKIPPING 'tree/files/patch-tree.c' '(file already exists)' else $echo 'x -' extracting 'tree/files/patch-tree.c' '(text)' sed 's/^X//' << 'SHAR_EOF' > 'tree/files/patch-tree.c' && --- tree.c.orig Mon Jan 29 22:38:30 2001 +++ tree.c Mon Dec 24 08:09:39 2001 @@ -422,7 +422,7 @@ X if (!noindent) indent(); X X if (inodeflag || devflag || pflag || sflag || uflag || gflag || Dflag) fprintf(outfile,"["); - if (inodeflag) fprintf(outfile,"%7ld",(*dir)->inode); + if (inodeflag) fprintf(outfile,"%7ld",(long)(*dir)->inode); X if (inodeflag && (devflag || pflag || uflag || gflag || sflag || Dflag)) fprintf(outfile,"%s",sp); X if (devflag) fprintf(outfile,"%3d",(*dir)->dev); X if (devflag && (pflag || uflag || gflag || sflag || Dflag)) fprintf(outfile,"%s",sp); SHAR_EOF (set 20 01 12 24 08 10 14 'tree/files/patch-tree.c'; eval "$shar_touch") && chmod 0644 'tree/files/patch-tree.c' || $echo 'restore of' 'tree/files/patch-tree.c' 'failed' if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \ && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then md5sum -c << SHAR_EOF >/dev/null 2>&1 \ || $echo 'tree/files/patch-tree.c:' 'MD5 check failed' 8964a9fe492223bdd68ad5f235105c2d tree/files/patch-tree.c SHAR_EOF else shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'tree/files/patch-tree.c'`" test 614 -eq "$shar_count" || $echo 'tree/files/patch-tree.c:' 'original size' '614,' 'current size' "$shar_count!" fi fi # ============= tree/files/patch-Makefile ============== if test -f 'tree/files/patch-Makefile' && test "$first_param" != -c; then $echo 'x -' SKIPPING 'tree/files/patch-Makefile' '(file already exists)' else $echo 'x -' extracting 'tree/files/patch-Makefile' '(text)' sed 's/^X//' << 'SHAR_EOF' > 'tree/files/patch-Makefile' && --- Makefile.orig Mon Dec 11 14:43:23 2000 +++ Makefile Mon Dec 24 08:17:21 2001 @@ -6,15 +6,16 @@ X # warranties, including, without limitation, the implied warranties X # of merchant-ability and fitness for a particular purpose. X -CC=gcc -CFLAGS=-O2 -Wall -fomit-frame-pointer #-m486 -LDFLAGS=-s +CC?= gcc +CFLAGS?= -O2 -Wall +LDFLAGS?= +PREFIX?= /usr/local +BINDIR= ${PREFIX}/bin +MANDIR= ${PREFIX}/man/man1 X X VERSION=1.3 X TREE_DEST=tree -BINDIR=/usr/local/bin X MAN=tree.1 -MANDIR=/usr/man/man1 X X all: tree X @@ -28,18 +29,15 @@ X if [ -f tree.o ]; then rm *.o; fi X rm -f *~ X -install: - install -d $(BINDIR) - install -d $(MANDIR) - if [ -e $(TREE_DEST) ]; then \ - install -s $(TREE_DEST) $(BINDIR)/$(TREE_DEST); \ - fi - install $(MAN) $(MANDIR)/$(MAN) +install: $(TREE_DEST) $(MAN) + mkdir -p $(BINDIR) + mkdir -p $(MANDIR) + ${BSD_INSTALL_PROGRAM} $(TREE_DEST) $(BINDIR) + ${BSD_INSTALL_MAN} $(MAN) $(MANDIR) X X distclean: X if [ -f tree.o ]; then rm *.o; fi X rm -f *~ - X X dist: distclean X tar zcf ../tree-$(VERSION).tgz -C .. tree-$(VERSION)/ SHAR_EOF (set 20 01 12 24 08 17 52 'tree/files/patch-Makefile'; eval "$shar_touch") && chmod 0644 'tree/files/patch-Makefile' || $echo 'restore of' 'tree/files/patch-Makefile' 'failed' if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \ && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then md5sum -c << SHAR_EOF >/dev/null 2>&1 \ || $echo 'tree/files/patch-Makefile:' 'MD5 check failed' f521f0b8da52e60baeb7f563ad9d6da7 tree/files/patch-Makefile SHAR_EOF else shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'tree/files/patch-Makefile'`" test 1063 -eq "$shar_count" || $echo 'tree/files/patch-Makefile:' 'original size' '1063,' 'current size' "$shar_count!" fi fi rm -fr _sh02970 exit 0 >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200112241353.fBODrI803148>