Skip to content
  • Olliver Schinagl's avatar
    CODINGSTYLE: Drop non-posix parameter extensions · 22911435
    Olliver Schinagl authored
    
    
    While the non-posix substring expansions and replacement expansions are
    in use in portage already; they currently do not always work properly.
    
    .githooks/pre-commit: 28: testing/gcc-cross-embedded/APKBUILD: Bad substitution
    
    where line 28 reads:
    	targetnorm="${target//-/_}"
    
    So best to avoid this construct when it doesn't even work all the time.
    
    A good replacement is:
    	targetnorm="$(echo "${target}" | tr - _)"
    
    which is posix compliant and works.
    
    Signed-off-by: default avatarOlliver Schinagl <oliver@schinagl.nl>
    22911435