summaryrefslogtreecommitdiff
path: root/functions/aliases.sh
diff options
context:
space:
mode:
authorAntonio Terceiro <terceiro@softwarelivre.org>2008-08-08 22:20:56 -0300
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:03:37 +0100
commit7f1a4e4fc50c636d187472388924109e853ec69e (patch)
treef07000b79efde785760d3cd4247209b0ba483401 /functions/aliases.sh
parent382d244050abbfb9f9e52ec9383d333b158ded5d (diff)
downloadvyos-live-build-7f1a4e4fc50c636d187472388924109e853ec69e.tar.gz
vyos-live-build-7f1a4e4fc50c636d187472388924109e853ec69e.zip
Replacing file checking with ls by function calls
Instead of repeatedly doing "ls ... > /dev/null 2>&1", just use a function that does exactly that.
Diffstat (limited to 'functions/aliases.sh')
-rwxr-xr-xfunctions/aliases.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/functions/aliases.sh b/functions/aliases.sh
index c4e029038..15ae2ae58 100755
--- a/functions/aliases.sh
+++ b/functions/aliases.sh
@@ -17,6 +17,11 @@ Truncate ()
done
}
+Find_files ()
+{
+ (ls "${@}" | grep -qs .) > /dev/null 2>&1
+}
+
In_list ()
{
NEEDLES="${1}"