Fix UPCASE bug

master
Marvin Johanning 2020-02-06 16:50:53 +01:00
parent acf14c084c
commit 6ec6b5014f
2 changed files with 6 additions and 6 deletions

View File

@ -20,10 +20,10 @@ along with RubyTldr. If not, see <http://www.gnu.org/licenses/>.
#Checks where the page exists in the page folders (and returns the operating system of the corresponding page)
def operating_system()
return "linux" if Dir.entries(@linux).include?("#{ARGV[0]}.md")
return "common" if Dir.entries(@common).include?("#{ARGV[0]}.md")
return "windows" if Dir.entries(@windows).include?("#{ARGV[0]}.md")
return "osx" if Dir.entries(@osx).include?("#{ARGV[0]}.md")
return "sunos" if Dir.entries(@sunos).include?("#{ARGV[0]}.md")
return "linux" if Dir.entries(@linux).include?("#{ARGV[0].downcase}.md")
return "common" if Dir.entries(@common).include?("#{ARGV[0].downcase}.md")
return "windows" if Dir.entries(@windows).include?("#{ARGV[0].downcase}.md")
return "osx" if Dir.entries(@osx).include?("#{ARGV[0].downcase}.md")
return "sunos" if Dir.entries(@sunos).include?("#{ARGV[0].downcase}.md")
return "nil" if ARGV[0].class == NilClass
end

View File

@ -20,7 +20,7 @@ along with RubyTldr. If not, see <http://www.gnu.org/licenses/>.
#Checking if the page exists, parsing it using parse_md and downloading it if necessary
def run()
page = "#{ARGV[0]}.md"
page = "#{ARGV[0].downcase}.md"
case operating_system()
when "linux"
parse_md(@linux, page)