Skip to content

Commit

Permalink
Merge pull request alectrona#10 from alectrona/fix-other-cats
Browse files Browse the repository at this point in the history
Swap other cats for echos
  • Loading branch information
ryangball authored Aug 16, 2023
2 parents 1960992 + bd09a99 commit 1a36a46
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions git4jamfpro.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,14 +163,14 @@ function process_changed_ea() {
--delete '/computer_extension_attribute/input_type/script')

# Ensure we can get a name of the EA from the xml record
name=$(cat "$cleanRecord" | xmlstarlet sel -T -t -m '/computer_extension_attribute' -v name)
name=$(echo "$cleanRecord" | xmlstarlet sel -T -t -m '/computer_extension_attribute' -v name)
[[ -z "$name" ]] && echo "Could not determine name of extension attribute from the xml record, skipping." && return 1

# Create xml containing both the original xml record and the script contents (if exists)
if [[ -n "$script" ]]; then
xml=$(cat "$cleanRecord" | xmlstarlet ed -s '/computer_extension_attribute/input_type' -t elem -n script -v "$(cat "$script" | xmlstarlet esc)" | xmlstarlet fo -n -o)
xml=$(echo "$cleanRecord" | xmlstarlet ed -s '/computer_extension_attribute/input_type' -t elem -n script -v "$(cat "$script" | xmlstarlet esc)" | xmlstarlet fo -n -o)
else
xml=$(cat "$cleanRecord")
xml=$(echo "$cleanRecord")
fi

# Bail if the xml didn't get encoded properly
Expand Down

0 comments on commit 1a36a46

Please sign in to comment.