]> gitweb.fluxo.info Git - wrappers.git/commitdiff
Delete top_panel_size config and the following blank line at mc config
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 16 Jun 2018 12:51:11 +0000 (09:51 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 16 Jun 2018 12:51:11 +0000 (09:51 -0300)
mc

diff --git a/mc b/mc
index 96ec17c4a8267bc24bde560305e54daf02b6b0e9..228abc50bc1f1a922cfca6b1a301012832d7edf7 100755 (executable)
--- a/mc
+++ b/mc
@@ -41,5 +41,17 @@ fi
 #
 # If $INI is a link, $CONF will be the link destination.
 # That's important because `sed -i` usually breaks the linking.
-sed -i '/^left_panel_size=.*$/d' $CONF
-sed -i '/^top_panel_size=.*$/d'  $CONF
+
+# Delete left_panel_size config
+if grep -q "^left_panel_size=.*$" $CONF; then
+  #sed -i '/^left_panel_size=.*$/,+1 d' $CONF
+  sed -i '/^left_panel_size=.*$/ d' $CONF
+fi
+
+# Delete top_panel_size config and the following blank line
+if grep -q "^top_panel_size=.*$" $CONF; then
+  sed -i '/^top_panel_size=.*$/,+1 d'  $CONF
+fi
+
+# Delete all empty lines from config
+#sed -i '/^$/d' $CONF