changeset 631:82c5fc679c6c

"apt-cyg listfiles" do the same as my cygsearch project.
author Oleksandr Gavenko <gavenkoa@gmail.com>
date Sun, 02 Apr 2017 16:42:19 +0300
parents ad57cd9cc810
children 882ed7909868
files cygwin/Makefile cygwin/cygsearch/Makefile cygwin/cygsearch/cygsearch.py cygwin/cygsearch/cygsearch.sh
diffstat 4 files changed, 1 insertions(+), 85 deletions(-) [+]
line wrap: on
line diff
--- a/cygwin/Makefile	Tue Mar 07 18:48:53 2017 +0200
+++ b/cygwin/Makefile	Sun Apr 02 16:42:19 2017 +0300
@@ -11,7 +11,7 @@
 # Default target.
 .DEFAULT_GOAL = all
 
-PROJS = cygrun cygsearch
+PROJS = cygrun
 
 define do-job
 	@for proj in ${PROJS}; do \
--- a/cygwin/cygsearch/Makefile	Tue Mar 07 18:48:53 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-# Copyright (C) 2011 by Oleksandr Gavenko <gavenkoa@gmail.com>
-
-SHELL = /bin/sh
-
-# Disable built in pattern rules.
-MAKEFLAGS += -r
-# Disable built in variables.
-MAKEFLAGS += -R
-# Disable built in suffix rules.
-.SUFFIXES:
-# Delete target file if command fails.
-.DELETE_ON_ERROR:
-# Default target.
-.DEFAULT_GOAL = all
-
-ifeq '' '$(prefix)'
-  ifneq '' '$(HOME)'
-    prefix = $(HOME)/usr
-  else
-    $(error HOME env var and prefix var are not set!)
-  endif
-endif
-
-bindir = $(prefix)/bin
-
-host_os = unix
-ifneq '' '$(COMSPEC)'
-  host_os = windows
-endif
-
-BUILD_SCRIPTS := $(lastword $(MAKEFILE_LIST))
-
-.PHONY: all
-all:
-
-.PHONY: check
-check:
-
-.PHONY: install
-install: $(APP)
-ifeq '$(host_os)' 'windows'
-	[ -d $(bindir) ] || mkdir -p $(bindir)
-	install -m 755 cygsearch.py $(bindir)/cygsearch
-endif
-
-.PHONY: uninstall
-uninstall:
-	rm -f $(bindir)/cygsearch
-
-.PHONY: distclean
-distclean: clean
-
-.PHONY: clean
-clean:
-
--- a/cygwin/cygsearch/cygsearch.py	Tue Mar 07 18:48:53 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,19 +0,0 @@
-#!/usr/bin/python
-
-import sys
-import glob
-import re
-import gzip
-
-r = re.compile(sys.argv[1])
-n = re.compile(r'/etc/setup/(.*)\.lst\.gz')
-
-for f in glob.glob(r'/etc/setup/*.lst.gz'):
-    name = n.match(f).group(1)
-    plain = gzip.open(f, "rb")
-    for line in plain:
-        line = line.rstrip('\n\r')
-        if r.search(line) != None:
-            print '%s: %s' % (name, line)
-    plain.close()
-
--- a/cygwin/cygsearch/cygsearch.sh	Tue Mar 07 18:48:53 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-regex=$(echo "$1" | sed -e 's|\\|&&|g' -e 's|=|\\=|g')
-
-for file in /etc/setup/*.lst.gz; do
-  name=${file#/etc/setup/}
-  name=${name%.lst.gz}
-  gzip -d -c $file | sed -n "\=$regex={s=^=$name: /=;p;}"
-done
-