[SCM] debian-live branch, master, updated. 1.0_a47-1-54-gbcd8472
Chris Lamb
chris at chris-lamb.co.uk
Fri Jun 20 00:45:17 UTC 2008
The following commit has been merged in the master branch:
commit 912c054a7ef3cd0f0e5a113a74f3588febaee297
Author: Chris Lamb <chris at chris-lamb.co.uk>
Date: Fri Jun 20 00:51:12 2008 +0100
Add In_list function to extract various bits of code that did (or should have done) the same job.
Signed-off-by: Chris Lamb <chris at chris-lamb.co.uk>
diff --git a/functions/aliases.sh b/functions/aliases.sh
index 031dc0e..c4e0290 100755
--- a/functions/aliases.sh
+++ b/functions/aliases.sh
@@ -16,3 +16,22 @@ Truncate ()
: > ${FILE}
done
}
+
+In_list ()
+{
+ NEEDLES="${1}"
+ shift
+
+ for ITEM in ${@}
+ do
+ for NEEDLE in ${NEEDLES}
+ do
+ if [ "${NEEDLE}" = "${ITEM}" ]
+ then
+ return 0
+ fi
+ done
+ done
+
+ return 1
+}
--
debian-live
More information about the debian-live-changes
mailing list