Project

General

Profile

« Previous | Next » 

Revision 14412

bugfix: lib/sh/util.sh: str2varname(): need to lowercase str because on case-insensitive filesystems, paths sometimes canonicalize to a different capitalization than the original

View differences:

util.sh
10 10

  
11 11
lowercase() { tr A-Z a-z <<<"$1"; }
12 12

  
13
str2varname() { echo "${1//[^a-zA-Z0-9_]/_}"; }
13
str2varname() { lowercase "${1//[^a-zA-Z0-9_]/_}"; }
14
	# lowercase: on case-insensitive filesystems, paths sometimes canonicalize
15
	# to a different capitalization than the original
14 16

  
15 17
include_guard_var() { str2varname "$(realpath "$1")"; }
16 18

  

Also available in: Unified diff