better?
This commit is contained in:
parent
f5947d8f4f
commit
752a4d14d9
|
|
@ -54,6 +54,8 @@ function check {
|
||||||
function check2 {
|
function check2 {
|
||||||
echo -n "Checking file existence in: "
|
echo -n "Checking file existence in: "
|
||||||
pushd "${WHERE}"
|
pushd "${WHERE}"
|
||||||
|
files=$(ls)
|
||||||
|
popd >> /dev/null
|
||||||
|
|
||||||
SAVEIFS=$IFS
|
SAVEIFS=$IFS
|
||||||
# unobtainium
|
# unobtainium
|
||||||
|
|
@ -62,7 +64,7 @@ function check2 {
|
||||||
for i in ${!DASHMAP[@]}; do
|
for i in ${!DASHMAP[@]}; do
|
||||||
found=0
|
found=0
|
||||||
|
|
||||||
for file in *; do
|
for file in $files; do
|
||||||
if [ "${DASHMAP[$i]}" == "$file" ]; then
|
if [ "${DASHMAP[$i]}" == "$file" ]; then
|
||||||
found=1
|
found=1
|
||||||
echo "found! $i -> $file"
|
echo "found! $i -> $file"
|
||||||
|
|
@ -72,13 +74,11 @@ function check2 {
|
||||||
|
|
||||||
if [ "$found" = "0" ]; then
|
if [ "$found" = "0" ]; then
|
||||||
IFS=$SAVEIFS
|
IFS=$SAVEIFS
|
||||||
popd >> /dev/null
|
|
||||||
echo "uh oh. configured DASHMAP file missing: ${DASHMAP[$i]}"
|
echo "uh oh. configured DASHMAP file missing: ${DASHMAP[$i]}"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
popd >> /dev/null
|
|
||||||
IFS=$SAVEIFS
|
IFS=$SAVEIFS
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue