Skip to content

Commit

Permalink
Scripts: do not error on missing directories
Browse files Browse the repository at this point in the history
  • Loading branch information
fichtner committed Sep 19, 2024
1 parent 89f8478 commit 3cbc792
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Scripts/dashboard-acl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@
ACLDIR=src/opnsense/mvc/app/models
WIDGETDIR=src/opnsense/www/js/widgets

ACLS=$(find -s ${ACLDIR} -name "ACL.xml"; if [ -d "${1}" ]; then find -s ${1}/${ACLDIR} -name "ACL.xml"; fi)
METADATA=$(find -s ${WIDGETDIR}/Metadata -name "*.xml")
WIDGETS=$(find -s ${WIDGETDIR} -name "*.js")
ACLS=$(
if [ -d ${ACLDIR} ]; then find -s ${ACLDIR} -name "ACL.xml"; fi
if [ -d "${1}" ]; then find -s ${1}/${ACLDIR} -name "ACL.xml"; fi
)
METADATA=$(if [ -d ${WIDGETDIR}/Metadata ]; then find -s ${WIDGETDIR}/Metadata -name "*.xml"; fi)
WIDGETS=$(if [ -d ${WIDGETDIR} ]; then find -s ${WIDGETDIR} -name "*.js"; fi)

for WIDGET in ${WIDGETS}; do
FILENAME=$(basename ${WIDGET})
Expand Down

0 comments on commit 3cbc792

Please sign in to comment.