summaryrefslogtreecommitdiffstats
path: root/src/dir.sh
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-04-25 18:17:34 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-04-25 18:17:34 (EDT)
commit7309686ac2456331cb0e5c54c1f4ceac996ba549 (patch)
tree4a14f6bac4a151e27837c217d01ff6dbe0ecb201 /src/dir.sh
parentc41d4889f85d2143aaf21adfce2aacf84b8c992f (diff)
dir_is_empty(): Move shift and remove duplicate pattern
Also update copyright notice.
Diffstat (limited to 'src/dir.sh')
-rw-r--r--src/dir.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dir.sh b/src/dir.sh
index ac7fef0..c04aa55 100644
--- a/src/dir.sh
+++ b/src/dir.sh
@@ -1,6 +1,6 @@
# Miscellaneous directory-related functions
#
-# Copyright (C) 2013, 2014 Patrick "P. J." McDermott
+# Copyright (C) 2013, 2014 Patrick McDermott
#
# This file is part of the ProteanOS Development Kit.
#
@@ -21,11 +21,11 @@
dir_is_empty()
{
local dir="${1}"
+ shift 1
local ret=
local dirent=
local exclude=
local exclusion=
- shift 1
ret=0
@@ -35,7 +35,7 @@ dir_is_empty()
# and aren't ".."
# .??* dirents whose names start with "." and are three or more
# characters long
- for dirent in "${dir}/"* "${dir}/".[!.] "${dir}/".[!.] "${dir}/".??*; do
+ for dirent in "${dir}/"* "${dir}/".[!.] "${dir}/".??*; do
if ! [ -e "${dirent}" ]; then
continue
fi