Skip to content

Augtool almost works in Windows Server 2012 R2 #476

@isosadam

Description

@isosadam

Hoping you can help, because I REALLY want to be able to use augtool in Windows (cygwin) like I can in Linux. The tool I'm building needs to be able to edit files (.xml, .sh, .properties) in Linux and on Windows, and I'd like to be able to use 1 tool for both platforms.

I've tried installing the 1.8 latest tar.gz straight up and also using the cygport method. Both have the same results. I'm using augtool from a bash script like so....

#!/bin/bash

cat <<EOF | augtool -At "Xml.lns incl ${TEMP_FILE}"
set /files/${TEMP_FILE}/Server/Service/Connector/#attribute/port "${APP_PORT}"
set /files/${TEMP_FILE}/Server/Service/Connector/#attribute/proxyName "${PROXY_NAME}"
set /files/${TEMP_FILE}/Server/Service/Connector/#attribute/proxyPort "${PROXY_PORT}"
set /files/${TEMP_FILE}/Server/Service/Connector/#attribute/scheme "${PROXY_SCHEME}"
set /files/${TEMP_FILE}/Server/Service/Connector/#attribute/secure "true"
save
EOF

$TEMP_FILE ends up with the whole file being truncated except for the "Service" and "Connector" tags.

<Server><Service><Connector port="8080"
                 proxyName="jira-stage.example.com"
                 proxyPort="443"
                 scheme="https" secure="true"></Connector>
</Service>
</Server>

This works GREAT in Linux, but I can't figure out why it is behaving differently in Cygwin.
Thanks - Adam

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions