source: live-build/trunk/fuentes/functions/aliases.sh @ 900

Last change on this file since 900 was 900, checked in by kbut, 3 years ago

add original source

  • Property svn:executable set to *
File size: 612 bytes
Line 
1#!/bin/sh
2
3## live-build(7) - System Build Scripts
4## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org>
5##
6## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
7## This is free software, and you are welcome to redistribute it
8## under certain conditions; see COPYING for details.
9
10
11Find_files ()
12{
13        (ls "${@}" | grep -qs .) > /dev/null 2>&1
14}
15
16In_list ()
17{
18        NEEDLES="${1}"
19        shift
20
21        for ITEM in ${@}
22        do
23                for NEEDLE in ${NEEDLES}
24                do
25                        if [ "${NEEDLE}" = "${ITEM}" ]
26                        then
27                                return 0
28                        fi
29                done
30        done
31
32        return 1
33}
34
35Truncate ()
36{
37        for FILE in ${@}
38        do
39                : > ${FILE}
40        done
41}
Note: See TracBrowser for help on using the repository browser.