From 78e60be7e785d8c3883283f7c88e1dfba2dc5c14 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Fri, 19 Jan 2018 19:26:27 +0100 Subject: [PATCH] osx: use "squiggly" heredoc The least indented line is use as a base. Ruby 2.3. --- osx/lldpd.rb | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/osx/lldpd.rb b/osx/lldpd.rb index fa4dbe06..11ef0d71 100644 --- a/osx/lldpd.rb +++ b/osx/lldpd.rb @@ -54,7 +54,7 @@ class Lldpd < Formula while uids =~ Regexp.new("#{Regexp.escape(uid.to_s)}\n") || gids =~ Regexp.new("#{Regexp.escape(uid.to_s)}\n") uid += 1 end - s = <<-EOS.undent + s = <<~EOS You need to create a special user to run lldpd. Just type the following commands: sudo dscl . -create /Groups/#{u} @@ -78,22 +78,22 @@ class Lldpd < Formula def plist additional_args = "" additional_args += "-x" if build.with? "snmp" - <<-EOS.undent - - - - - Label - #{plist_name} - ProgramArguments - - #{opt_sbin}/lldpd - #{additional_args} - - RunAtLoad - KeepAlive - - + <<~EOS + + + + + Label + #{plist_name} + ProgramArguments + + #{opt_sbin}/lldpd + #{additional_args} + + RunAtLoad + KeepAlive + + EOS end end -- 2.39.5