[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 5bb250b 1/5: Robustify

From: Greg Chicares
Subject: [lmi-commits] [lmi] master 5bb250b 1/5: Robustify
Date: Tue, 17 Apr 2018 13:02:40 -0400 (EDT)

branch: master
commit 5bb250b076a196e5ff3e642758aab5db9cf30d41
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>

    Revisited commit 2ff93c93acf to guard against 'cd' failure.
 install_msw.sh | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/install_msw.sh b/install_msw.sh
index 9982c8d..405f1a2 100755
--- a/install_msw.sh
+++ b/install_msw.sh
@@ -257,10 +257,9 @@ fi
 # to be discarded, and any differences in the '.git' subdirectory,
 # which are presumably important to keep.
-cd /opt/lmi/src || print "Cannot cd"
-if [ -d lmi-moved-"$stamp0" ]
+if [ -d /opt/lmi/src/lmi-moved-"$stamp0" ]
-mv lmi lmi-new-"$stamp0" && mv lmi-moved-"$stamp0" lmi
+cd /opt/lmi/src && mv lmi lmi-new-"$stamp0" && mv lmi-moved-"$stamp0" lmi
 stamp1=$(date -u +'%Y-%m-%dT%H:%M:%SZ')

reply via email to

[Prev in Thread] Current Thread [Next in Thread]