sed -n ${top},${bot}p ${HOME}/.project|less
}
-xtar()
-{
- local opts
- local type
- local fname=$1
-
- if [ -z "${fname}" ]; then
- echo No filename specified >&2
- return 1
- fi
-
- type=$(file ${fname}|cut -d' ' -f2)
-
- case $type in
- (tar) opts=xf ;;
- (gzip) opts=zxf ;;
- (bzip2) opts=jxf ;;
- (xz|XZ) opts=Jxf ;;
- (*)
- # try lzma
- if lzmainfo ${fname} &>/dev/null; then
- opts="--lzma -xf"
- else
- printf "Unknown file type: %s\n" $type >&2
- return 2
- fi
- ;;
- esac
-
- tar ${opts} ${fname}
-}
-
-vtar()
-{
- local opts
- local type
- local fname=$1
-
- if [ -z "${fname}" ]; then
- echo No filename specified >&2
- return 1
- fi
-
- type=$(file ${fname}|cut -d' ' -f2)
-
- case $type in
- (tar) opts=tvvvf ;;
- (gzip) opts=ztvvvf ;;
- (bzip2) opts=jtvvvf ;;
- (xz|XZ) opts=Jtvvvf ;;
- (*)
- # lzma. Here because lzmainfo is too stupid
- if lzmainfo ${fname} &>/dev/null; then
- opts="--lzma -tvvvf"
- else
- printf "Unknown file type: %s\n" $type >&2
- return 2
- fi
- ;;
- esac
-
- tar ${opts} ${fname}|less
-}
-
## Check if there is a newer build script, maybe update.
# NOTE: Updating needs SXEmacs. It'll work in XEmacs and Emacs too,
# but you'll need to change build-update() accordingly.
alias deps='grep --colour "Deps: " ${HOME}/.project'
alias listp='pinky -l $(whoami)|less'
alias patches='find ${SLACKPKG}/**/$(whoami)|grep -E "(diff|patch)"'
+alias vtar=less
+alias xtar='tar xf'
H-pkg()
{
Package Notes/Content:
- ipkg Displays the \`Install Notes'. (alias: ipkg)
- gpkg Displays the \`General Notes'. (alias: gpkg)
+ ipkg Displays the \`Install Notes'.
+ gpkg Displays the \`General Notes'.
listp Displays the entire package info (piped through less(1))
srepo Display the package's source repo location.
rawrepo Output just the repo URL (to use with lynx, curl, etc)
- trepo Display the type of repo (tla, git, svn, mercurial etc)
+ trepo Display the type of repo (git, svn, mercurial, tla etc)
web Display the package's homepage URL.
rawweb Output just the web URL (to use with lynx etc)
deps Display the package's dependencies
Tarball Handling:
- xtar [TARBALL] Extract TARBALL, automatically choosing the appropriate
- tar(1) options.
- vtar [TARBALL] List the contents of TARBALL, automatically choosing
- appropriate options and piping through less(1).
+ xtar [TARBALL] Extract TARBALL
+ vtar [TARBALL] List the contents of TARBALL
Build Scripts:
#!/bin/bash
-# Copyright (C) 2008 - 2014 Steve Youngs
+# Copyright (C) 2008 - 2021 Steve Youngs
# Author: Steve Youngs <steve@sxemacs.org>
# Maintainer: Steve Youngs <steve@sxemacs.org>
# Created: <2008-03-10>
-# Time-stamp: <Monday Mar 3, 2014 17:24:16 steve>
+# Time-stamp: <Sunday Jan 24, 2021 15:30:21 steve>
# Homepage: N/A
# Keywords: utils package-management
header_dirs=(/usr/include /usr/X11R6/include)
## bastard header directories...
-#header_dirs=(\
-# /usr/include \
-# /usr/X11R6/include \
-# /opt/jdk/include \
-# /opt/qt/include \
-# /opt/kde/include)
+# header_dirs=(\
+# /usr/include \
+# /usr/X11R6/include \
+# /opt/jdk/include \
+# /opt/qt/include \
+# /opt/kde/include)
sym=${1}
-all_headers=$(find -H -L ${header_dirs[*]} -type f -name "*.h" -print)
-
### FIXME: This is totally brain dead, it'll match on shit you don't
# want like comments.
# A possible solution might be to use etags in some way.
-for header in ${all_headers} ; do
- grep -E -l --mmap --colour ${sym} ${header} 2>/dev/null
-done
+grep -Erlm1 --colour ${sym} ${header_dirs[*]} 2>/dev/null
## header-symbol-search ends here