2007-11-10 13:40:53 -01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2010-09-02 11:12:37 +00:00
|
|
|
## live-build(7) - System Build Scripts
|
2020-03-11 09:07:21 -01:00
|
|
|
## Copyright (C) 2016-2020 The Debian Live team
|
2015-01-04 18:05:39 -01:00
|
|
|
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
|
2010-09-02 11:12:37 +00:00
|
|
|
##
|
2012-07-29 23:59:00 +00:00
|
|
|
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
|
2010-09-02 11:12:37 +00:00
|
|
|
## This is free software, and you are welcome to redistribute it
|
|
|
|
## under certain conditions; see COPYING for details.
|
|
|
|
|
2007-11-10 13:40:53 -01:00
|
|
|
|
2008-08-09 01:20:56 +00:00
|
|
|
Find_files ()
|
|
|
|
{
|
|
|
|
(ls "${@}" | grep -qs .) > /dev/null 2>&1
|
|
|
|
}
|
|
|
|
|
2008-06-19 23:51:12 +00:00
|
|
|
In_list ()
|
|
|
|
{
|
2015-01-06 02:36:55 -01:00
|
|
|
local NEEDLE="${1}"
|
2008-06-19 23:51:12 +00:00
|
|
|
shift
|
|
|
|
|
|
|
|
for ITEM in ${@}
|
|
|
|
do
|
2015-01-06 02:36:55 -01:00
|
|
|
if [ "${NEEDLE}" = "${ITEM}" ]
|
|
|
|
then
|
|
|
|
return 0
|
|
|
|
fi
|
2008-06-19 23:51:12 +00:00
|
|
|
done
|
|
|
|
|
|
|
|
return 1
|
|
|
|
}
|
2008-08-09 01:21:56 +00:00
|
|
|
|
|
|
|
Truncate ()
|
|
|
|
{
|
|
|
|
for FILE in ${@}
|
|
|
|
do
|
2015-04-26 18:19:51 +00:00
|
|
|
if [ ! -L ${FILE} ]
|
|
|
|
then
|
|
|
|
: > ${FILE}
|
|
|
|
fi
|
2008-08-09 01:21:56 +00:00
|
|
|
done
|
|
|
|
}
|