Ticket #875: 0001-ticket-875-properties-files-get-unduly-modified-by.patch

File 0001-ticket-875-properties-files-get-unduly-modified-by.patch, 1.8 KB (added by Bang Pham Huu, 8 years ago)

New update

  • applications/petascope/update_properties.sh

    From 48c5e0f383a389f2d3050de46a1ba3754ecec658 Mon Sep 17 00:00:00 2001
    From: BangPH <b.phamhuu@jacobs-university.de>
    Date: Thu, 3 Dec 2015 07:34:59 +0100
    Subject: [PATCH] ticket:875 - properties files get unduly modified by 
     installation procedure (fix creating redundant backup properties if nothing 
     was added and permission to 644 of properties files)
    
    ---
     applications/petascope/src/main/resources/log4j.properties        | 0
     applications/petascope/src/main/resources/petascope.properties.in | 0
     applications/petascope/update_properties.sh                       | 8 ++++++++
     3 files changed, 8 insertions(+)
     mode change 100755 => 100644 applications/petascope/src/main/resources/log4j.properties
     mode change 100755 => 100644 applications/petascope/src/main/resources/petascope.properties.in
    
    diff --git a/applications/petascope/src/main/resources/log4j.properties b/applications/petascope/src/main/resources/log4j.properties
    old mode 100755
    new mode 100644
    diff --git a/applications/petascope/src/main/resources/petascope.properties.in b/applications/petascope/src/main/resources/petascope.properties.in
    old mode 100755
    new mode 100644
    diff --git a/applications/petascope/update_properties.sh b/applications/petascope/update_properties.sh
    index 7f9f998..ff28f6b 100755
    a b if [ ! -f "$NEW" ]; then  
    109109fi
    110110echo -e
    111111
     112#2.3 Check if NEW and OLD file are the same (no need to create a backup and do anything else)
     113cmp --quiet "$NEW" "$OLD"
     114if [[ $? -eq 0 ]]; then
     115   log "The existing configuration is already up to date."
     116   ok
     117fi
     118echo "Done."
     119
    112120# --------------------------------------------
    113121#3 Backup the OLD file by renaming to OLD.bak
    114122logn "Backing up your old configuration file to $OLD_BAK... "