Skip to content

Commit

Permalink
Fix: xml/xmlstarlet was hardcoded in bin/daps
Browse files Browse the repository at this point in the history
  • Loading branch information
fsundermeyer committed Mar 6, 2024
1 parent fed33c5 commit 872b471
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
13 changes: 8 additions & 5 deletions bin/daps.in
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ export prefix=@prefix@
# need to be added here!!
#





# check for xmlstarlet binary
for _binary in xmlstarlet xml; do
XMLSTARLET=$(which $_binary 2>/dev/null)
[[ 0 -eq $? ]] && break
done
[[ -z $XMLSTARLET ]] && exit_on_error "Required package \"xmlstarlet\" is not installed"

declare -a VARLIST
VARLIST=(
Expand Down Expand Up @@ -158,6 +160,7 @@ VARLIST=(
XML_CATALOG_FILES
XMLFORMAT_CONFIG_FILE
XML_MAIN_CATALOG
XMLSTARLET
XML_USER_CATALOGS
XSLTPARAM
XSLTPROC
Expand Down Expand Up @@ -1665,7 +1668,7 @@ DOCBOOK_STYLES=${DOCBOOK_STYLES%/}
# ----------------------------------------------------------------------------
# Check whether we have an assembly by checking the root element from MAIN
#
IS_ASSEMBLY=$(xml sel -t -v "local-name(/*)" $MAIN 2>/dev/null)
IS_ASSEMBLY=$($XMLSTARLET sel -t -v "local-name(/*)" $MAIN 2>/dev/null)

# ----------------------------------------------------------------------------
# Now export all variables set by the config file
Expand Down
7 changes: 0 additions & 7 deletions lib/unpack-locdrop
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,6 @@ function unpack-locdrop {
# to send them
#

# check for xmlstarlet binary
for _binary in xmlstarlet xml; do
XMLSTARLET=$(which $_binary 2>/dev/null)
[[ 0 -eq $? ]] && break
done
[[ -z $XMLSTARLET ]] && exit_on_error "Required package \"xmlstarlet\" is not installed"

#
# Get a list of all translated xml files
#
Expand Down

0 comments on commit 872b471

Please sign in to comment.