Make this work with -current sources. Also fetch tarball from LOCAL_PORTS,

having people fetch from the FreeBSD-current archive (and having it
break at unpredictable times) wasn't a good idea.
This commit is contained in:
Satoshi Asami 1997-01-02 06:29:50 +00:00
parent 6d6eb442fc
commit de40ddbf21
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=5156
4 changed files with 26 additions and 24 deletions

View File

@ -1,21 +1,20 @@
# New ports collection makefile for: colorls
# Version required: FreeBSD-current (around October '95)
# Version required: FreeBSD-current (around January '97)
# Date created: 8 March 1995
# Whom: Satoshi Asami
#
# $Id: Makefile,v 1.10 1996/11/11 05:49:20 obrien Exp $
# $Id: Makefile,v 1.11 1996/12/17 12:33:29 asami Exp $
#
DISTNAME= colorls
PKGNAME= colorls-2.1
PKGNAME= colorls-2.2
CATEGORIES= misc
MASTER_SITES= ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/src/bin/
MASTER_SITES= ftp://freefall.freebsd.org/pub/FreeBSD/LOCAL_PORTS/
DISTFILES= ls.tar.gz
MAINTAINER= asami@FreeBSD.ORG
WRKSRC= ${WRKDIR}/ls
IGNOREFILES= ${DISTFILES}
pre-patch:
${CP} ${WRKSRC}/ls.1 ${WRKSRC}/colorls.1

View File

@ -1 +1 @@
MD5 (ls.tar.gz) = IGNORE
MD5 (ls.tar.gz) = 9912034525558b016c7700d939807e76

View File

@ -5,18 +5,21 @@
int f_timesort; /* sort by time vice name */
int f_type; /* add type character for non-regular files */
+int f_color; /* add type in color for non-regular files */
int
main(argc, argv)
@@ -122,7 +123,7 @@
f_listdot = 1;
#ifndef BSD4_4_LITE
int f_whiteout; /* show whiteout entries */
#endif
@@ -135,9 +136,9 @@
fts_options = FTS_PHYSICAL;
#ifdef BSD4_4_LITE
- while ((ch = getopt(argc, argv, "1ACFLRTacdfgikloqrstu")) != EOF) {
+ while ((ch = getopt(argc, argv, "1ACFGLRTacdfgikloqrstu")) != EOF) {
#else
- while ((ch = getopt(argc, argv, "1ACFLRTWacdfgikloqrstu")) != EOF) {
+ while ((ch = getopt(argc, argv, "1ACFGLRTWacdfgikloqrstu")) != EOF) {
#endif
switch (ch) {
/*
* The -1, -C and -l options all override each other so shell
@@ -152,6 +153,9 @@
case 'F':
f_type = 1;
@ -50,7 +53,7 @@
+ if (!f_longform && !f_listdir && !f_type && !f_color)
fts_options |= FTS_COMFOLLOW;
/* If -l or -s, figure out block size. */
#ifndef BSD4_4_LITE
--- ./ls.h.org Wed Mar 8 02:14:11 1995
+++ ./ls.h Wed Mar 8 02:17:11 1995
@@ -49,6 +49,7 @@
@ -234,7 +237,7 @@
@@ -36,16 +36,24 @@
.\" ls.1,v 1.3 1994/09/24 02:55:53 davidg Exp
.\"
.Dd April 18, 1994
.Dd July 29, 1994
-.Dt LS 1
+.Dt COLORLS 1
.Os
@ -245,9 +248,9 @@
+.Nd list directory contents in color
.Sh SYNOPSIS
-.Nm ls
-.Op Fl ACFLRTacdfiloqrstu1
-.Op Fl ACFLRTWacdfiloqrstu1
+.Nm colorls
+.Op Fl ACFGLRTacdfiloqrstu1
+.Op Fl ACFGLRTWacdfiloqrstu1
.Op Ar file ...
.Sh DESCRIPTION
+(Note: This man page describes the color version of the program. To
@ -261,10 +264,10 @@
For each operand that names a
.Ar file
of a type other than
@@ -85,6 +93,12 @@
an equals sign (=) after each socket,
@@ -87,6 +95,12 @@
a percent sign (%) after each whiteout,
and a vertical bar (|) after each that is a
.Tn FIFO .
.Tn FIFO .
+.It Fl G
+Use ANSI color sequences to distinguish file types. (See
+.Ev LSCOLORS

View File

@ -1,14 +1,14 @@
This is a simple hack to the 2.0R /bin/ls to use ANSI sequences to
This is a simple hack to the FreeBSD /bin/ls to use ANSI sequences to
display file attributes in color. There is a -G flag (somewhat
similar to the -F flag). Take a look at the man page for details.
The program is called "colorls" and installs itself in /usr/local/bin.
The file patches/patch-aa is the diffs with the 2.0-Release /usr/src/bin/ls
directory.
The file patches/patch-aa is the diffs from the 3.0-current (as of
1997/01/01) /usr/src/bin/ls directory.
Standard xterm prior to XFree86 3.1.2B doesn't know about colors, so
you should use color_xterm or kterm (available from the ports
collection) if you are using older versions of XFree86.
you should use update your XFree86 or use kterm (available from the ports
collection).
Satoshi Asami
asami@cs.berkeley.edu