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

File 0001-ticket-875-properties-files-get-unduly-modified-by-i.patch, 1.9 KB (added by Bang Pham Huu, 9 years ago)
  • applications/petascope/update_properties.sh

    From bd3a251f09d25703b4f300d52f6bb000fbbad854 Mon Sep 17 00:00:00 2001
    From: Bang Pham Huu <bphamhuu@jacobs-university.de>
    Date: Wed, 2 Dec 2015 22:58:09 +0200
    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
     .../petascope/src/main/resources/petascope.properties.in         | 0
     applications/petascope/update_properties.sh                      | 9 +++++++++
     3 files changed, 9 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..020b4aa 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)
     113logn "Checking the difference between Old and New configuration files..."
     114cmp --quiet "$NEW" "$OLD"
     115if [[ $? -eq 0 ]]; then
     116   log "The existing configuration is already up to date."
     117   ok
     118fi
     119echo "Done."
     120
    112121# --------------------------------------------
    113122#3 Backup the OLD file by renaming to OLD.bak
    114123logn "Backing up your old configuration file to $OLD_BAK... "